Revamped Style Snooper

Update: This utility has become a bit irrelevant since Reflector now has a BAML Viewer add-in. You can use it to view any assembly containing BAML resources, which it will automatically decompile into XAML.

Style Snooper (or StyleSnooper?), originally posted by Lester, is a tool that can extract control styles from a compiled assembly. Quite useful to take a peek at someone else's work. :-)

I added a couple of features:

  • Switch to a FlowDocumentScrollViewer to view the style (much handier than a plain old TextBox; just try hitting Ctrl+F.)
  • Primitive syntax-coloring.
  • A bit of glass.
  • And the feature that made me start tinkering with this tool to begin with – load other assemblies.
  • I also fixed the TargetType property to use the proper Type MarkupExtension ({x:Type …}) and removed the IsPublic restriction from the type list.

P.S. If you're wondering about my wallpaper, it's "Song of the Sky" from Digital Blasphemy. It used to be in the free gallery, but isn't anymore. It's very reminiscent of Vista's Aurora.

Attachment: StyleSnooper.rar
Published Sunday, November 05, 2006 2:09 PM by aelij
Filed under: ,

Comments

# re: Revamped Style Snooper

Wednesday, June 06, 2007 6:11 AM by Rohit

How can you get Styles for themes other than what you have loaded? For instance you are getting the Aero theme Style, how about getting the Style for a Button for a Luna theme?

# re: Revamped Style Snooper

Friday, June 08, 2007 12:23 AM by aelij

Check out BAML Viewer for Reflector (see links at the top of this post.)

# Examiner les styles (WPF) par défaut des controles du framework -- StyleSnooper--

Sunday, July 29, 2007 7:34 AM by Pierrick's Blog

voici un outil pratique pour examiner la définition du style par défaut des différents controles WPF

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 7 and 6 and type the answer here:

Enter the numbers above: