This example demonstrates all common ways of using themes in your application.
DevExpress provides multiple themes that can be applied to all DevExpress WPF controls and some standard controls (GroupBox, ScrollViewer, Scroll, RadioButton, Button, ListBox, Slider, TabControl, Separator, ToggleButton, RepeatButton, Label, ListBoxItem, TabItem, ToolTip, etc.). All built-in themes are described in the following article: DevExpress WPF Themes.
The easiest way to apply a particular theme to the application is to specify the static ThemeManager.ApplicationThemeName property.
To set a theme for a specific element, use the ThemeManager.ThemeName attached property:
[XAML]xmlns:dx=”http://schemas.devexpress.com/winfx/2008/xaml/core”<TextBoxName="textBox1"dx:ThemeManager.ThemeName="MetropolisLight"Width="120"Height="23"/>
In this case, the theme will be applied to the element and all its child elements.
Keep in mind these simple rules when applying DevExpress themes:
1. The ThemeManager.ApplicationThemeName property has lower priority than the ThemeManager.ThemeName property set locally.
2. The ThemeManager.ThemeName property value set for a parent element may be changed for its child if you explicitly specify the ThemeManager.ThemeName property for it.
In some cases, you may need to retrieve a list of all available DevExpress themes. The static Theme.Themes property contains this information.
See Also:
KA18580 - How to modify DX themes in WPF
K18542 - How to implement the ThemeMananger theme support in custom controls
T207471 - How to use the ThemeResource extension to load resources from DevExpress themes dynamically