I am working with Prism modules. That means I have a lot of projects inside my solution and I would like to share my WPF styles across all of them.
Currently I am simply adding them to all my xaml files. As Example:
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Pack://application:,,,/MyProject.Shared;component/Styles/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<UserControl.Resources>
I was wondering if there is a better solution for this problem.
Edit: The "possible duplicate" is actually what I am doing at the moment.
I want to get rid of this repetitive code snippet in each of my UserControls. Since most of my projects are UserControlLibraries
/ Prism Modules
they don´t have a kind of App.xaml
where I can define the ResourceDictionaries.