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?
Attached is a screenshot, what I want to achieve.
In order to wash the controls with ResourceWasher, you have to use the theme .xaml files, rather than the ThemeManager.
You have to add them to your project from the installed file in:
C:\Program Files (x86)\Infragistics\2016.2\WPF\Themes\MetroDark
To illustrate this I have modified your project, please find it as an attached file.
Sincerely,NickEntry-Level Software Developer
it's working, but is it possible to exclude some areas to wash? Have a look at the screenshot, which areas should not be washed (red arrow).
You can exclude elements from washing if you use an attached property IsExcludedFromWash.
In order to exclude a button foreground for example, you have to find the brush that it uses and add this property. In the same project open file Styles.Shared.xaml, add the namespace igTheme, and in the brushes section modify :
Which will keep the original button's foreground color. If you want you can also style in the application all the buttons' foreground colors to white, which will override the washer.
The resource washer does not wash two colors - black and white. If the background in a theme is washed it is not absolute black, it is a very dark gray. If you want to paint it black, you can use the same approach as I mentioned above - exclude it from wash or set the style.
Please also take a look in this topic:http://www.infragistics.com/help/wpf/reswash-using
Thanks for the answer. It is working for the Button and the Textbox. But how to do it for the XamOutlookBar, XamDataGrid and XamDataTree? The help file doesn't include that information.
When I look into the e.g. MetroDark.xamOutlookBar.xaml file, there are no styles in there.
Actually I just want to change the LightBlue Color of the DarkMetroTheme to a different color. May be there is an easier approach?
Attached is the project where the OutlookBar and a Grid is included.
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.