Obfuscate XAML in WPF application 

When your WPF application is compiled into the build, XAMLs are converted to the BAML form of XAML.

The BAML is abbreviation for Binary Application Markup File, a compiled XAML file.

These BAML forms are stored in YourApplicationName.g.resources file. The resource file is built-in inside your compiled exe or dll.

Download demo-trial now!
Order Skater .NET obfuscator!

Every WPF .NET production-quality application uses resources. A resource is any nonexecutable data that is logically deployed with an application. A resource might be displayed in an application as error messages or as part of the user interface. Resources can contain data in a number of forms, including strings, images, BAMLs, and persisted objects. A XAML file can be compiled into a .baml (Binary XAML) file, which may be inserted as a resource into a .NET Framework assembly.

Skater .NET Obfuscator
More about Skater .NET Obfuscator
Download Skater .NET Obfuscator
Order Skater .NET Obfuscator

At run-time, .NET Framework engine calls Application.LoadComponent() method to retrieve a XAML object instance from BAML. It extracts the .baml file from assembly resources, parses it, and creates a corresponding WPF visual tree or workflow.

Why do we need to obfuscate XAML (baml) in WPF applications?

There are special software tools that load assemblies containing BAML resources (e.g. localized resource assemblies) and show the corresponding XAML. Anybody can see your XAMLs embedded in your .NET assembly.