Include Xaml once packaged

Since you are bundling the XAML as a resource, you should be able to read and execute it.

This post lays out how to use the resource methods to access the embedded resources: Specify user when building exe - #6 by adam

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.