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

Tagged with:
 

4 Responses to Revamped Style Snooper

  1. Rohit says:

    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?

  2. aelij says:

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

  3. TrackBack says:

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

  4. Keff says:

    Hi, I fixed a bug with indentation (move indent– to the top of its block, this fixes closing tags that were too much indented), and compacted the user interface so that there is more space for code.
    You can download it form http://sklad.tomaskafka.com/code/stylesnooper-fixed.zip

    My mail is keff85 at gmail.

Set your Twitter account name in your settings to use the TwitterBar Section.