I have the following XAML block
'BaseStyles.xaml
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ShinyBlue.xaml"/>
<ResourceDictionary Source="DataGrid.Generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Forms that reference this work at design time, but not at run time. If my form directly refers to the ShinyBlue.xaml or DataGrid.Generic.xaml file, this stylesheet works.
EDIT
If I paste this directly into the form, it works correctly. Apparently the problem has something to do with my wrapper.
Broken
<Window.Resources>
<ResourceDictionary Source="../BaseStyles.xaml"/>
</Window.Resources>
Job
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ShinyBlue.xaml"/>
<ResourceDictionary Source="DataGrid.Generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
source
share