[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Collapse]Diagram Control
    Getting Started
   [Expand]Diagram Control
   [Expand]End-User Interaction
   [Expand]Diagram Items
   [Expand]Automatic Layout
   [Expand]Data Binding
    Themes and Styles
    Printing and Exporting
    Saving and Loading Diagrams
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Themes and Styles

Expanded Overview

Diagram themes are predefined sets of diagram item styles that can be applied to a diagram in a single click. Each theme consists of font settings and a set of styles that can be applied to individual diagram items. Styles are a combination of background, foreground and stroke colors used to paint an item.

Diagram themes are encapsulated by the DiagramTheme class objects. The static ThemeRegistrator class provides methods to manage the collection of themes.

The DevExpress.Diagram.Core.DiagramThemeColorId enumeration stores identifiers of theme colors. The DiagramTheme.ColorPalette property provides access to the theme's color scheme.

The DiagramTheme.EffectCollection property provides access to the collection of effects that defines how colors are used in the theme. It returns an object of the DiagramEffectCollection type that has the following properties:

Item styles are encapsulated by DiagramItemStyle class objects.

The DiagramItem.ThemeStyleId property value identifies the style applied to the item. Identifiers for available shape and connector styles are stored in the DevExpress.Diagram.Core.DiagramShapeStyleId and DevExpress.Diagram.Core.DiagramConnectorStyleId classes correspondingly.

Expanded Applying Themes and Styles

End-users can apply a theme by selecting it in the Ribbon's Themes group on the Design page. The Shape styles group on the Home page allows end-users to apply styles to the selected items.

To apply a theme in code, use the DiagramControl.Theme property. The static DevExpress.Diagram.Core.DiagramThemes class contains themes that are available by default. The ThemeRegistrator.Themes collection stores registered themes.

Expanded See Also

Is this topic helpful?​​​​​​​