Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to create a custom theme for shapes in DiagramDesignerControl

$
0
0

Shapes in the Diagram control are colored according to an applied theme. To create a custom theme, add a resource dictionary into your application and add the Theme element into it. 
Each theme should contain a color palette which defines main colors used in a theme. To specify a color palette, add the ColorPalette element into Theme. 

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


EffectCollection has the following properties:
-ThemeEffects. Influences colors in the "Theme Styles" group.
-VariantEffects. Influences colors in the "Variant Styles" group. When a shape is created its default color scheme is taken from this group.
-ConnectorEffects. Influences connector colors.
 
To register a custom theme, use the ThemeRegistrator.RegisterThemes method. 


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>