ColorEdit Class
In This Article
Represents a color editor.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v14.2.dll
#Declaration
[TemplatePart(Name = "PART_MoreColorsButton", Type = typeof(BarButtonItem))]
[TemplatePart(Name = "PART_ResetButton", Type = typeof(BarButtonItem))]
[TemplatePart(Name = "PART_Gallery", Type = typeof(Gallery))]
[TemplatePart(Name = "PART_NoColorButton", Type = typeof(BarButtonItem))]
[DXToolboxBrowsable(DXToolboxItemKind.Free)]
public class ColorEdit :
BaseEdit,
IColorEdit
#Remarks
The ColorEdit editor allows an end-user to choose colors from the RGBA color space.
Its features include:
- 20 Preset Palettes - Apex, Civic, Grayscale, Office, etc.
- Recent Colors Palette - includes custom colors, which can be added via the 'More Colors' dialog.
- Unlimited Number of Custom Color Palettes - by default, the editor displays three color palettes: Theme Colors, Gradient Theme Colors and Standard Colors. You can replace default palettes, or add any number of custom color palettes. To create a color palette, create a new instance of the CustomPalette class and define the colors. Use the ColorPalette.CreateGradientPalette static method to create a palette with gradient colors. To display a custom palette within the editor, add it to the ColorEdit.Palettes collection.
- Configurable Palette Layout - you can manually specify the number of color columns using the ColorEdit.ColumnCount property. Alternatively, the number of columns is automatically calculated.
- Customizable Default Color - you can specify the default color, applied by clicking the Automatic button. To do this, use the ColorEdit.DefaultColor property.
- Optional Empty Color - to allow an end-user to select an empty color (ColorEdit.EmptyColor), set the ColorEdit.ShowNoColorButton property to true. This shows the 'No Color' button within the editor.
- Localizable UI
#Examples
#Inheritance
#Extension Methods
See Also