What is .baml file?

23.3k Views Asked by At

What is .baml file and what's the use of this file? Who creates this file?

4

There are 4 best solutions below

3
On BEST ANSWER

A compiled XAML file.

Wikipedia says:

A XAML file can be compiled into a .baml (Binary XAML) file, which may be inserted as a resource into a .NET Framework assembly. At run-time, the framework engine extracts the .baml file from assembly resources, parses it, and creates a corresponding WPF visual tree or workflow.

0
On

BAML form is an optimized form of XAML used by the WPF XAML implementation. It is optimized in the sense that it uses internal lookups and tokens for commonly used types or members. The optimization is useful as an implementation detail that addresses packaging size and load time for WPF application scenarios that involve XAML. Full Topic on Msdn

0
On

.baml = Binary Application Markup File, a compiled XAML file.

1
On

The purpose of BAML is only for checking if generated WPF controls have right values in their properties. Compiled XAML has also its auto-generated *.cs code. You can look at in your app\DEBUG\OBJ directory. Every XAML file has generated cs. Its name is XAMLfileName.g.cs where g means generated.