Been a while since i used the tool, once you got teh NTFS module resolved, however ive gone to use the tool today having made a slight change to a file, however when i packaged it it wouldnt run unless i copied the XAML file to the same folder the exe was now in.
Ive not had to do that before and wondered if it wa snew or if i was doing something wrong?
TBH not always entirely sure what settings i should be using when packaging. Its a WPF as well
but Iām not sure if this is implemented with the method used in Visual Studio apart from the package script to exe. right mouse click on ps1. I donāt see or know how to include additional resources.
what Iām trying to do is use a ContentControl, to display additional information and or any other type of control that may be ideal for whatever action Iām trying to present to the user.
the additional resource is a UserControl XAML that gets sent to the ContentControl when a user hits a button.
I am aware that manual embedding would work, however, depending on the scope of the project this can be quite a bit of additional XAML to manually include.
I would expect the Resource properties set to True would also embed the additional XAML file.
You could certainly use the pre-build steps to embed the XAML some how. The enhancement would be to make it work all automatically without having to do that.
So then in your Import-XamlView function, you could use the read the manifest stream for the XAML file using the referenced example rather than writing out a separate file.
I just tried this myself and the resource is included but it looks like the compilation process messes with the XAML resource for some reason. Hereās an example of how to read the embedded XAML resource.
I have a project that includes WpfWindow1.xaml.
This produces an executable that includes that resource. You can see the resource is stored under WpfWindow1.xaml.g.resources.