We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Platform : WPF
|
Category : Resources

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

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.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.