I have a WPF library UserControls and a ResourceDictionary that are shared in a library.
All UserControls in this library appear in only one parent "shell" element, which is actually just a container for a collection of smaller controls. I can access the ResourceDictionary from my shell control, as expected, when I add the following XAML
<Control.Resources> <ResourceDictionary Source="MyResources.xaml" /> </Control.Resources>
However, I cannot access the ResourceDictionary from the child controls that are inside the shell control.
I got the impression that WPF should check the resources locally and then move up until the appropriate resources are found?
Instead i get
Cannot find resource named '{BoolInverterConverter}'. Resource names are case sensitive. Error at object 'System.Windows.Data.Binding' in markup file...
Obviously, I can (and I) refer to the ResourceDictionary in my child controls; but each control should now reference this dictionary, and I figured this was optional.
Any ideas, am I doing something weird or don't believe in the wrong behavior?
source share