Let’s say you’re a .NET developer who has decided to learn more about WPF. Before you have spent an hour researching WPF you encounter XAML. This unfamiliar XML creature will be your constant companion, living side-by-side with your code, for the remainder of your WPF career.
XAML is a declarative way to describe a related group of items. In WPF this is usually a visual tree of objects. For example a grid with two columns and 3 rows, a textbox in Col1,Row2 and so on.
Since you are declaring your desire to use these objects in your project they need to be converted to something that can function on your computer. In .NET that means converting to Intermediate Language (IL). This IL can then be processed by the CLR which then turns the IL into Native Code that will happily run on your computer.
Rob Relyea has a nice starter article that explains the various ways the raw XAML is stored, processed and turned into useable executable code.
Read his post. I’ll talk more about BAML and generated files in Part 2.