Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1750
Metro Dark Theme - change text color
posted

Hello community!

I am using the Metro Dark theme in an application. The color for the textbox/labels is a light gray (#BABABA). My customer now wants the text colors to be changed to "white" for having a higher contrast.

A) the theme could be changed during the runtime

B) When switching to "Metro Dark" I execute the following code:

Infragistics.Themes.ThemeManager.ApplicationTheme = new Infragistics.Themes.MetroDarkTheme() { StyleMicrosoftControls = true };

SolidColorBrush cellBackground = new SolidColorBrush(Color.FromRgb(255, 255, 255));

Style newStyle = new Style();

newStyle.TargetType = typeof(TextBox);

newStyle.Setters.Add(new Setter(TextBox.BackgroundProperty, cellBackground));

Application.Current.Resources.Add(typeof(TextBox), newStyle);


But the font color stay the same. Is there a different way to change the font color?
Thank you