Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.
How to Create a Custom Theme for Shapes in DiagramDesignerControl
3 minutes to read
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.