CustomPaletteEventArgs.PaletteName Property
Gets the name of the selected palette.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v26.1.Core.dll
Declaration
Property Value
| Type | Description |
|---|---|
| String | The palette name. |
Remarks
Use this property in a CustomPalette event handler to identify the requested palette and supply custom colors for it. The example below checks PaletteName and substitutes colors only for the built-in Bright palette; other palettes are unchanged:
using DevExpress.DashboardCommon;
using DevExpress.Drawing;
using System.Collections.Generic;
using System.Drawing;
void OnCustomPalette(object sender, CustomPaletteEventArgs e) {
if (e.PaletteName == nameof(DashboardPalette.Bright)) {
List<DashboardPaletteItem> paletteItems = new List<DashboardPaletteItem>();
paletteItems.Add(new DashboardPaletteItem(Color.SteelBlue));
paletteItems.Add(new DashboardPaletteItem(Color.SeaGreen, DXHatchStyle.DiagonalCross));
paletteItems.Add(new DashboardPaletteItem(Color.IndianRed, DXHatchStyle.Sphere, DXDashStyle.Dash));
paletteItems.Add(new DashboardPaletteItem(Color.Goldenrod));
e.Palette = new DashboardPalette(paletteItems);
}
}
See Also