Skip to main content

RepositoryItemColorPickEdit.ThemeColors Property

Provides access to colors displayed in the Theme Colors group in the Custom tab.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Browsable(false)]
public Matrix ThemeColors { get; set; }

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 tab.

Remarks

The Custom page displays the Theme Colors, Standard Colors and Recent Colors groups:

image

You can use the ThemeColors, StandardColors and RecentColors properties to change the colors in these groups.

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;
    }
}

ColorPickEdit_ChangeThemeColors_ex

See Also