Changes colors with ResourceWasher


I am using the DarkMetroTheme and want to change the default "Blue" color with some other color. Also the font color needs to be changed. I looked at the samples, but couldn't figure out how it works.

Attached is a sample project where I tried to add the ResourceWasher component in the app.xaml file in order all controls are effected.

Can you please help me to recolor my theme?

Parents Reply
  • 2370
    Offline posted in reply to Markus

    Hello Markus,

    In order to change a single color in a theme, you have to change it in each control in your application. Using Snoop you can identify the Light Blue color is  #FF00AADE.

    The ResourceDictionary for some controls (e.g. XamOutlookBar, XamDatapresenter) for the Metro Dark Theme reference to the same control's assembly. You can change that reference to a file you can modify. This file can be found in  C:\Program Files (x86)\Infragistics\2016.2\WPF\DefaultStyles folder. There is a folder for every such control. For those two controls you will need OutlookBarMetroDark.xaml and DataPresenterMetroDark.xaml files.

    Note that, when you use a Default Style file, you will also need four or five additional files on which the default file depends and you can find them all in the same control's directory. Additionally you might have to reference in you project Microsoft's PresentationFramework.Luna and PresentationFramework.Aero assemblies.

    When all the files are added to your project, you can identify files which are named [UsedControl]MetroDark_Brushes.xaml (e.g. DataPresenterMetroDark_Brushes.xaml, OutlookBarMetroDark_Brushes.xaml) find the #FF00AADE color and changed it. I have modify your project and replaced this color with "GoldenRod ", you can find it as an attached sample. Finally you have to replace it in Theme.Colors.xaml too. Note also, that in some files it might be set more than once, so you have to replace it at all the occurrences.

     If I can be of further assistance concerning this matter, please let me know.

No Data