Skip to main content

CustomPaletteEventArgs.Palette Property

Gets or sets a palette used to color dashboard item elements.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v26.1.Core.dll

Declaration

public DashboardPalette Palette { get; set; }

Property Value

Type Description
DashboardPalette

A DashboardPalette object that specifies a palette used to color dashboard item elements.

Remarks

The following code snippet handles the CustomPalette event to apply the Sunset palette to the loaded dashboard:

using DevExpress.DashboardCommon;

namespace Dashboard_Coloring {
  public partial class Form1 : RibbonForm {
    public Form1() {
      InitializeComponent();
      dashboardDesigner1.CreateRibbon();
      dashboardDesigner1.CustomPalette += DashboardDesigner1_CustomPalette;
      Dashboard dashboard = new Dashboard(); 
      dashboardDesigner1.Dashboard = dashboard;
    }

    void DashboardDesigner1_CustomPalette(object sender, CustomPaletteEventArgs e) {
      e.Palette = DashboardPalette.Sunset;
    }
  }
}

This handler returns the palette for every request, so the dashboard always uses the Sunset palette even if you select a different palette in the Color Scheme dialog. To customize a specific palette instead, check the CustomPaletteEventArgs.PaletteName property.

See Also