StandardStyles.xaml Visualizer
Overview
When I started working with WinRT apps in Visual Studio,one of the first things I noticed was all the AppBar Button styles in the StandardStyles.xaml dictionary. There are almost 200 in there although they are all commented out by default when you create a new project.
Deciding which button to put on my AppBar was a common thing I found myself doing and it was also frustrating since I couldn’t immediately see what these buttons looked like. There were places online which described how to examine the Segoe UI font in the Windows Character Map dialog but that was a big pain and it didn’t really show me what those AppBar Buttons would look like.
What I needed was some type of visualizer for the styles in the StandardStyles.xaml file.
my resource viewer application
There are 4 main types of styles in StandardStyles.xaml:
- AppBarButtons
- Buttons
- TextBlocks
- RichTextBlocks
I needed an application that would read StandardStyles.xaml, collect the above 4 types of styles, and display each style’s target control on the screen. And it would be nice if I could click the styled control and get the XAML for creating a control with that style copied to my clipboard.
I wanted to be able to click this:
And get this on my clipboard:
<Button Style="{StaticResource ZeroBarsAppBarButtonStyle}" AutomationProperties.Name="ZeroBarsAppBarButtonStyle" />
I’ve pasted screenshots of this app to provide a visual reference here for the 4 types of styles in StandardStyles.xaml. If you’re interested in the source code of my app, I’ve uploaded it to my SkyDrive here.
app_bar_buttons reference
This section shows all 192 AppBarButton styles.
button reference
This section shows the 6 Button styles.
text_block reference
This section shows the 13 TextBlock styles.
rich_text_block reference
This section shows the 4 styles.