WPF and Silverlight Edition Basic Library / Menu and ContextMenu / Menu and ContextMenu Features / Theming
Theming

Silverlight themes are a collection of image settings that define the look of a control or controls. The benefit of using themes is that you can apply the theme across several controls in the application, thus providing consistency without having to repeat styling tasks.

This topic only illustrates themes on the C1Menu control. However, the themes for the C1ContextMenu control are identical to the theming of the C1Menu control's submenus.

When you add the C1Menu control to your project, it appears with the default blue theme:

You can theme the C1Menu control with one of our six included Silverlight themes: BureauBlack, Cosmopolitan, ExpressionDark, ExpressionLight, RainierOrange, ShinyBlue, and WhistlerBlue.

You can add any of these themes to the menu controls by declaring the theme around the control in markup.

Complete the following steps:

  1. Open the .xaml page in Visual Studio.
  2. Place your cursor between the <Grid></Grid> tags.
  3. In the Tools panel, double-click the C1ThemeRainierOrange icon to declare the theme. Its tags will appear as follows:
XAML
Copy Code
<my:C1ThemeRainierOrange></my:C1ThemeRainierOrange>
  1. Place your cursor between the <my:C1ThemeRainierOrange> and </my:C1ThemeRainierOrange> tags.
  2. In the Tools panel, double-click the C1Menu icon to add the control to the project. Its tags will appear as children of the <my:C1ThemeRainierOrange> tags, causing the markup to resemble the following:
XAML
Copy Code
<my:C1ThemeRainierOrange>
    <c1:C1Menu></c1:C1Menu>
</my:C1ThemeRainierOrange>
  1. Run your project.                 

 The following image depicts a C1Menu control with the C1ThemeRainierOrange theme.