RepositoryItemColorPickEdit.ThemeColors Property
Provides access to colors displayed in the Theme Colors group in the Custom page.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v19.2.dll
Declaration
Property Value
Type | Description |
---|---|
DevExpress.XtraEditors.ColorPickEditControl.Matrix | A DevExpress.XtraEditors.ColorPickEditControl.Matrix object that comprises colors displayed in the Theme Colors group in the Custom page. |
Remarks
The Custom page displays the Theme Colors, Standard Colors and Recent Colors groups:
You can use the ThemeColors, RepositoryItemColorPickEdit.StandardColors and RepositoryItemColorPickEdit.RecentColors properties to substitute default colors with custom ones.
The following code shows how to change the Theme Colors palette to display shades of green:
using DevExpress.XtraEditors.ColorPickEditControl;
Matrix themeColors = colorPickEdit1.Properties.ThemeColors;
int cellCount = themeColors.Size;
double green = 255;
double greenDelta = (double)255/cellCount;
for(int i=0; i<themeColors.RowCount; i++) {
for(int j=0; j<themeColors.ColumnCount; j++) {
themeColors[i, j] = Color.FromArgb(0, (int)green, 0);
green = green - greenDelta;
}
}
See Also