I’m trying to create a pack ui referencing a xaml resource inside of an assembly file in powershell. After reading this post I tried to do this:
$resource = new-object system.uri("pack://application:,,,/WPFResource;component/test.xaml")
The I get an error noting that it is expecting a port since there are two colons.
Can anyone please advice?
You can go about this one of two ways. One is to load up and init the WPF infrastructure:
The other way is to manually register the pack protocol: