Skip to main content

DiagramControl.Theme Property

Specifies the current theme. This is a dependency property.

Namespace: DevExpress.Xpf.Diagram

Assembly: DevExpress.Xpf.Diagram.v24.1.dll

NuGet Package: DevExpress.Wpf.Diagram


public DiagramTheme Theme { get; set; }

Property Value

Type Description

A DiagramTheme object.


Shapes in the DiagramControl are colored according to the applied theme. To create a custom theme, add a resource dictionary with a DevExpress.Diagram.Core.Themes.Theme element to your application.

Each theme should contain a color palette. To specify a color palette, add the DevExpress.Diagram.Core.Themes.ColorPalette element into the DevExpress.Diagram.Core.Themes.Theme.

To specify how colors are used in a theme, set the Theme.Effects property. This property accepts the DevExpress.Diagram.Core.Themes.EffectCollection object that defines colors shown in the following gallery:


DevExpress.Diagram.Core.Themes.EffectCollection has the following properties:

  • ThemeEffects - Specifies colors in the “Theme Styles” group.
  • VariantEffects - Specifies colors in the “Variant Styles” group. When a shape is created its default color scheme is taken from this group.
  • ConnectorEffects - Specifies connector colors.

To register a custom theme, use the ThemeRegistrator.RegisterThemes method.

        Title="MainWindow" Height="700" Width="1100">

        <dxdiag:DiagramDesignerControl SelectedStencils="BasicShapes, BasicFlowchartShapes" Name="diagramControl"/>


The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Theme property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also