I am working on a VSIX project wherein I am trying to make the extension responsive to all kinds of Themes(Light, Dark and Blue) whichever the user selects. The controls and the text becomes unreadable on certain theme. I tried using the ThemeDictionaries in the Resource Dictionary in the UserControl.Resources but my controls do not adapt to the selected theme. Can someone tell me what is the correct way of using the ThemeDictionaries in a VSIX Project Below is the code I tried:
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="myBrush" Color="{StaticResource SystemBaseHighColor}"/>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="myBrush" Color="{StaticResource SystemBaseHighColor}"/>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<SolidColorBrush x:Key="myBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</UserControl.Resources>