Compiling a WPF app into XAML instead of BAML

741 Views Asked by At

Is there any way to get the wpf/c# compiler to embed XAML straight into the assembly as normal XAML text, rather than compiling it to BAML? (this is to make it easier to look at and edit later on, once it's in the assembly)

1

There are 1 best solutions below

0
Felix C On

I think you have to change compile settings to None and copy it to your output folder..

Then, when you're starting your application it must load the xaml dynamical at runtime (like CodeDOM if you compile code at runtime).

For this XamlReader looks nice, but never tried it.. Try this link: Loading XAML at runtime?