So I create a WPF Window manually, and then want to load an existing Xaml file onto it. Is this possible?
I am doing this inside a 3rd party app, so need to basically create the WPF Window manually and then assign a Xaml file on it.
I don’t know if I can do it in a different way.
I wanted to compile a WPF app as a class library but I get:
“Library project file cannot specify ApplicationDefinition element.” error.
Otherwise I would want to have the app defined in a DLL and then load this Window from there, set it’s owner, etc. Is that possible?
Wouldn’t creating it as WPF Usercontrol library and then adding them dynamically more easier? In any case make sure you don’t have App.xaml when you are creating the class library (most probably that is causing the ApplicationDefinition issue).