Live Chat Icon For mobile
Live Chat Icon

How do I view the XAML resources compiled into an assembly in BAML format?

Platform: WPF| Category: Resources

Embedded XAML Resources

Several WPF assemblies come with embedded XAML resources, like template definitions, style definitions, etc. And it’s often very useful to take a look at these embedded XAML to understand the structure of a control and thereby making it easier to customize it’s UI in your applications, if necessary.

The best way to take a look at these embedded XAML resources is to use the Reflector tool with the BAML Viewer plugin.

Reflector + BAML Viewer

Reflector is a popular Free tool available since the early days of .NET to help you take a deeper look at the source and resources comprising a .NET assembly. Reflector can be downloaded here:

.NET Reflector

Here is a thumbnail view of the Reflector tool:

Once you install the Reflector, download the BAML Viewer plug-in from:
BAML Viewer – Reflector Plugin

The plug-in is a single dll called Reflector.BamlViewer.dll. Put this dll next to the Reflector.exe and follow these steps to add the plug-in to the Reflector:
a) In the Reflector tool, select the View/Add Ins… menu item.
b) In the ‘Add Ins’ dialog box, Add the above dll as an ‘add-in’. This will include a new ‘Tools/BAML Viewer’ menu item in the Reflector.
c) Then open a WPF assembly (or Syncfusion assembly) that usually contains a BAML resource, like PresentationFramework.Aero.dll (usually found under ‘%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.Aero.dll’)
d) Then select the ‘Tools/BAML Viewer’ menu item. This will open a new ‘BAML Viewer’ view showing the embedded XAML in the above assembly.

Here is a screenshot of the BAML Viewer showing the embedded XAML in the PresentationFramework.Aero.dll:

You can similarly view XAML resources embedded into Syncfusion assemblies.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.