Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

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.

Take the survey Not interested

RepositoryItemColorPickEdit.ThemeColors Property

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

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.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