When I try to display a WPF dialog (summarydialog) in my CS-Script script. I get an error that it cannot locate the xaml files. It's searching here in the Initializecomponent function.
System.Uri resourceLocater = new System.Uri("/CLTD;component/view/summarydialog.xaml", System.UriKind.Relative);
summarydialog.xaml is compiled as "page".
Using dotPeek I see summarydialog.baml (binary version of xaml) located in the CLTD.g.resources/View folder.
How can I tell CS-Script how to locate xaml files? Or perhaps someone knows how to display WPF XAML dialog windows from a CS-Script.
If it's simply the file extension, how does the executable work? Isn't it using the same DLL assembly?
You don't need to load the XAML resource. Since it's already compiled, you can just add a reference to the assembly and then create a new instance of the control like normal.
I created a test .NET 5.0 WPF application to test this and built the project.
Here's the cs-script I wrote.
Then, here's the cli command I ran to run the script: