image

I’ve recently used the Accordion menu in Silverlight for one of my UI.  I’m pretty much amazed with the efficiency of this control in saving lot of screen real estate and at the same time having lots of controls packed into it.  I’m posting this to share the same with others, on using this Accordion menu.  Please follow the steps below:

  1. Download the Silverlight 4 Toolkit from http://silverlight.codeplex.com/releases/view/43528
  2. Install the toolkit in the development box
  3. Add System.Windows.Controls.Layout.Toolkit assembly reference
  4. Add the namespace reference for "http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit” in xaml with a prefix
  5. Add the following code to have Accordion menu in the application

<toolkit:Accordion Height="138" HorizontalAlignment="Left" Name="accordion1" VerticalAlignment="Top" Width="151" SelectionSequence="CollapseBeforeExpand" SelectionMode="ZeroOrOne">

<toolkit:AccordionItem Content="Level 1 Content" Header="Level 1" />

<toolkit:AccordionItem Content="Level 1 Item" Header="Level 1" />

</toolkit:Accordion>

For more samples, please refer Silverlight 4 samples