I'm playing around with the idea of implementing a component library for a UWP app.
One thing I'm struggling with is accessing resources from resource libraries in the component library from within the main application.
Here's the solution layout for my test application:
So MainPage.Xaml contains an instance of TemplatedControl
and I want to give the style (TemplatedControlStyle
) which is contained in the resource dictionary Dictionary1
.
How would I go about doing it?
I've had a go with the examples from here ResourceDictionary in a separate assembly but that question was about WPF rather than UWP and doesn't seem to work
I am not sure which category of URI schemes applies to such case but the following pattern should work.
<ResourceDictionary Source="ms-appx:///[library name]/Dictionary1.xaml"/>