I wrote a custom ResourceDictionary that implements theme support in the exact same way: by loading the appropriate theme dictionary depending on the light/dark theme.
<ApplicationName:ThemeResourceDictionary.LightResources>
<ResourceDictionary Source="/ApplicationName;component/Resources/Light.xaml"/>
</ApplicationName:ThemeResourceDictionary.LightResources>
<ApplicationName:ThemeResourceDictionary.DarkResources>
<ResourceDictionary Source="/ApplicationName;component/Resources/Dark.xaml"/>
</ApplicationName:ThemeResourceDictionary.DarkResources>
Stylr file:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BitmapImage x:Key="Logo62" UriSource="/ApplicationName;component/icon_62_dark.png" />
On my XAML page I use it like
<Image Source="{StaticResource Logo62}" Margin="0,4,10,0"/>
when I run the application all works well but in Expression Bland i have an error: "The resource "Logo62" could not be resolved" and I do not see this image. Could anybody help me how to fix this issue.