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

Parents
  • 29105
    Offline posted

    Hello grubarec,

    Thank you for contacting Infragistics. There are several xaml files that set the Metro look and feel for each control. Knowing wich files to modify depend on the controls you wish to style. Please list the controls you are working with.

    The files you need to modify are located here:

    C:\Program Files (x86)\Infragistics\20xx.x\WPF\DefaultStyles

    Let me know if you have any questions regarding this matter.

Reply Children
No Data