How do I use global resources in WPF?
- by Banford
I have a WPF application which I would like to use some static resources in. I have created a Resource Library XAML file which contains a resource. I have also added a string into the Resources of the project through the Properties panel.
I assumed I could just use these resources with the binding expression:
{StaticResource ResourceName}
But visual studio is telling me the resources are not found. Do I have to include some form of reference in my XAML? The examples I have seen only include resources locally such as:
<Window.Resources>, <Page.Resources> etc
I don't want to include the resources locally because I want them to be available to multiple parts of the application.