I first created a UserControl
.
In the xaml I can reference StaticResource
s that are in the main Application's Resources.
I then refactored this UserControl
to a Control
and via Themes/Generic.xaml,
I apply a ControlTemplate
(I needed this).
But this way the StaticResource
s are not found anymore (an XamlParseException
is thrown at runtime).
I could merge the ResourceDictionaries
that contain the StaticResource
I need also in the Genericl.xaml file, but I'd like to avoid this due to performance issues
What are the mechanics behind this behaviour?