Hello,
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?
Hello Markus,
The GroupBox does not have themed background, because we change the background of MS controls only if the background is different from transparent by default. If the background is equal to transparent the control will be styled but the background will be the default(transparent or equal to parent’s background). You can see that the TextBox’s default Background is equal to white(#FFFFFFFF), but the GroupBox’s default Background is transparent.
After investigating the styled functionality and doing some research, the XamBackground control has been determined to be a product idea. You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com. Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.
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.
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.
Here is also a screenshot:
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.