Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Collapse]Windows 10 App Controls
  Prerequisites
 [Expand]Getting Started
 [Expand]Controls
 [Collapse]Themes and Color Schemes
   Color Scheme Customization
   Automatic Template Overriding for Default Controls
  Localization
  Get More Help
 [Expand]API Reference
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Color Scheme Customization

This document describes how to customize the color scheme of your application.

Expanded Overriding Colors

The DevExpress.Core.ThemeManager.GenericColorScheme.AllScopes property provides access to color settings for individual elements of all DevExpress Universal controls. A color setting is represented by the DevExpress.Themes.ColorSet object that specifies two colors corresponding to the Default and Light UI themes (to learn more, see the ElementTheme topic on MSDN). To override a default color setting, assign the desired value in the App constructor before the InitializeComponent method. A color can be represented by the Windows.UI.Color object or its hexadecimal value. If you set a color setting to a color value, the value is assigned both to the Default and Light colors. The code snippet below illustrates how to override default colors.

Expanded Creating Custom Themes

To create a custom theme, follow these steps.

  • Create a DevExpress.Themes.Generic.GenericColorScheme descendant and override its Initialize method. In the method's implementation, call the base.Initialize method to initialize base color scopes and then override default colors.

  • Use the DevExpress.Core.ThemeManager.RegisterColorScheme method to register the new theme. To apply the new theme, set the ThemeManager.CurrentColorSchemeName property to the name of the custom theme.

Expanded Using DevExpress Brushes in Resources

The DevExpress.Core.ColorKey.Link attached property allows you to set a Brush value in the Resources to a color used by the DevExpress Universal control.

The example below illustrates how to set the ContentControl's Foreground to different colors used by DevExpress controls depending on the current theme.

Expanded Using the AccentColorizer Class

The DevExpress.Core.AccentColorizer class allows you to customize the color scheme of all DevExpress controls in your application based on a specified accent color.

To change the current accent color, use the Apply method.

How would you rate this topic?​​​​​​​