Skip to main content

ThemeManager Class

Represents a theme manager, allowing you to apply themes.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public class ThemeManager :
    DependencyObject,
    IThemeManager

Remarks

DevExpress provides multiple themes that can be applied to all DevExpress controls for WPF and some standard controls (GroupBox, ScrollViewer, Scroll, RadoiButton, Button, ListBox, Slider, TabControl, Separator, ToggleButton, RepeatButton, Label, ListBoxItem, TabItem, ToolTip, etc).

To apply a theme, assign its name to the ThemeManager.ThemeName property.

<Window x:Class="WpfApplication5.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    Title="Window1" Height="300" Width="300"
    dx:ThemeManager.ThemeName="Office2007Black">
    <Grid>
        <dxg:GridControl Name="grid" Width="400" Height="270"
                         AutoPopulateColumns="True">
            <dxg:GridControl.View>
                <dxg:TableView AutoWidth="True"/>
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</Window>

To prevent theming of individual controls, set the ThemeManager.ThemeName attribute to ‘None’. The ‘DeepBlue’ theme is applied to a DevExpress control if the ThemeManager.ThemeName attribute is set to ‘None’.

<TextBox Name="textBox1" dx:ThemeManager.ThemeName="None"
            Width="120" Height="23"/>

Note

Lightweight themes work with the LightweightThemeManager and do not support the ThemeManager and its API.

Refer to the following help topic for more information: List of DevExpress WPF Themes.

Inheritance

See Also