title: Compilation of XAML files (WPF)
body: <p>I would like to understand the compilation process of XAML files. Sorry for putting this question here but I really did not find any resource explaining this process in-depth. </p>
  
  <p>I understand that XAML is compiled into a .baml file. But: Is the .baml compiled from the generated .g.cs file? Or is the .baml independent and is the IL code generated from the generated .g.cs AND the original .xaml.cs file - this would explain why MainWindow is partial. Which parts of the XAML declarations go into the BAML file? 
  I would like to know also when the loading of a .baml file takes place (for example when talking about a window). 
  Thanks for the help. </p>