I have a DataTemplate
defined in a xaml file that I want to access via C# code.
Can anyone please tell me how can I access it?
I added a new ResourceDicti
For the life of me, although I was able to load my resource dictionary via XAML, I wasn't able to load it via "code behind" (in C#).
So I resorted to have a view loading it: (MyView.xaml)
Then access it in my UT by instanciating that view and accessing it:
new MyView().Resources.MergedDictionaries[0]
Hacky, but works.