Some procedural code does get generated in the XAML compilation process (if you use
x:Class), but it’s just some “glue code” similar to what had to be written to load and parse a loose XAML file at runtime. Such files are given a suffix such as
.g.i.vb), where the
g stands for generated and the
i stands for IntelliSense.
Each generated source file contains a partial class definition for the class specified with
x:Class on the root object element. This partial class contains a field (private by default but configurable with
x:FieldModifier) for every named element in the XAML file, using the element name as the field name. It also contains an
InitializeComponent method that does the grunt work ...