since XAML is a declarative language I am guessing that when WPF app executes it somehow parses XAML and executes the associated API commands line by line with parameters based on numeric values in XAML. Well, so can I somehow extract those commands so that I could run them as part of my C# program, without using XAML?
Share
This is done at build time, you’ll find the auto-generated .g.cs files back in the obj\Debug directory of your project. Not exactly the kind of code you’d want to write, it is only correct code, not pretty code. Typical for code generators. But sure, it can be helpful to study it and see how XAML declarations gets converted to equivalent C# code.