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.
DiagramEffectCollection.ThemeEffects - Provides access to the collection of effects that can be applied to shapes and are displayed in the "Theme Styles" ribbon group. This collection contains exactly 6 elements.
DiagramEffectCollection.VariantEffects - Provides access to the collection of effects that can be applied to shapes and are displayed in the "Variant Styles" ribbon group. This collection contains exactly 4 elements.
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.
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.