Silverlight leaves a lot of choices up to you as a developer. For example, creating a menu or navigational system for your Silverlight application is pretty much wide open. There is a template navigational application that Microsoft supplies with Visual Studio 2010 that uses HyperlinkButton controls as the menus. However, if you have more than just a few menus, you will fill up the screen pretty quickly. It would be nice if you had a way to have expanding a set of menus, so you could have your top set of menus such as "Maintenance" and "Security" that would show up to the user, and then when you click on either one of these, they would expand to reveal each menu item as shown in Figure 1.
Figure 1: An expanding menu system.
In this article you will learn how to create an expanding menu system using the normal Silverlight ListBox control.
Create Menu User Control
The first step is to create a menu item user control that will go into each ListBoxItem control in the list box. For this you will use a Border control and a TextBlock control. Create a User Control named ucMainMenu and add the following XAML to this user control.
View Complete Post