when applying the MetroDarkTheme, the background of my container controls don't get black, e.g. UserControl, Panels, ... But the XamTabControl gets the propper background color.
What do I miss?
I have created a simple sample application with UserControl some container controls and XamTabControl. I have set the MetroDark theme via our ThemeManager and everything works on my machine. I have attached the sample project I used to test this. Please test this project on your PC, whether or not it works correctly may help indicate the nature of this problem. If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.
My test was performed using version 16.1 – 2146 and 16.2 – 2016. If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing. Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance. Sincerely, ZhivkoEntry Level Software Developer
Thanks, for that example. This is working as expected, as long all controls are in the TabControl container. I meant, if you place the controls outside of the TabControl, that background is not set as the same as in the TabControl.
I modified your example, to demonstrate what I mean.
Here is also a screenshot:
The behavior you have reported is expected since the ThemeManager does not support the container controls you are using. You can see list with the Supported Microsoft WPF controls from the following topic: ‘Applying a Theme to the Supported Microsoft WPF Controls’. You can find simple workaround for this from ‘Applying theme’ sample in our WPF Samples Browser. Basically you can set the container background based on the applied theme. I have modified the ‘SetThemeViaThemeManaager’ project to show you how can set the background of the container you wish.
Please let me know if you require any further assistance on this matter.
Sincerely, ZhivkoEntry Level Software Developer
Thanks for the example. But setting the background manually on all windows is not very elegant and error prone. If you just have one control its not a problem. Introducing new themes also means, always changing to code providing the proper background color manually.
Please introduce a new e.g. XamBackground control, which I can put on my form and is styled according to the selected theme.
The GroupBox doesn't have a themed background as well (although it is listed as supported controls). Is this a bug? So, I cannot use the GroupBox as background container.