Reputation: 51
I have class which doesn't have Resources property but I need a kind of resources in it. I tried to create it as ResourceDictionary and tried to work with it as it is common resource dictionary, but I get an exception when xaml-file is parsed. Should I do something special? Does anyone have such experience?
Upvotes: 1
Views: 217
Reputation: 24453
You should not be trying to create your own property to shoehorn into the existing resource system. Your class should be derived from FrameworkElement
(or one of its derivatives) which has the common Resource
property on it that works with the built in hierarchical resource system.
Upvotes: 2