Extensibility - Metro Theme Sample Code Released!

Extensibility - Metro Theme Sample Code Released!

Rate This
  • Comments 2

This morning the LightSwitch Team released samples in both Visual Basic and C# that contain the code for the recently released Metro Theme for Visual Studio LightSwitch.

For more information on creating extensions for Visual Studio LightSwitch, seeVisual Studio LightSwitch 2011 Extensibility Toolkit.

LightSwitch Metro ThemeDownload the LightSwitch Metro Theme Extension Sample

The sample expands upon the Help topic Walkthrough: Creating a Theme Extension, which demonstrates a simple theme that defines fonts and colors. The Metro theme also makes use of styles, defining new appearance and behavior for the built-in LightSwitch control templates. To provide a consistent experience, you will need to define Resource Dictionaries in the form of a .xaml file for each control template, as shown in the following illustration:

Solution explorer view of Metro Theme solution

Additional styles are defined in the MetroStyles.xaml file, which also contains a MergedDictionaries node that references the other .xaml files. When LightSwitch loads the extension, it reads in all of the style information and applies it to the built-in templates, providing a different look and feel for your application.

There isn't much actual code in this sample; most of the work is done in xaml. You can use this sample as a starting point for your own theme, changing the fonts, colors, and styles to create your own look.

Enjoy,

-Steve Hoag, Visual Studio LightSwitch

Leave a Comment
  • Please add 5 and 5 and type the answer here:
  • Post
  • It would be nice to see examples.

  • Bookmarked :) Due to too much homework, it might take some time before I'm done with my project, but I'll post a screenshot when it's done :)

Page 1 of 1 (2 items)