In the application I am working on a requirement is to have support for windows themes (Aero, Classic, Luna).
I have a few custom controls which I want to respect the current theme.
I have created themes-folder and placed
/themes/classic.xaml
/themes/luna.normalcolor.xaml
/themes/aero.normalcolor.xaml
/themes/generic.xaml
In the AssemblyInfo.cs of the project containing the custom controls I have defined ThemeInfo as the following:
[assembly: ThemeInfo(
ResourceDictionaryLocation.SourceAssembly,
ResourceDictionaryLocation.SourceAssembly
)]
When I change theme in windows, all standard controls switch theme, but my custom controls refuses to read from anything but generic.xaml
Am I missing anything obvious here?