Skip to main content

Palettes Class

A class that allows you to access the list of predefined treemap palettes.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v22.2.dll

NuGet Package: DevExpress.TreeMap

Declaration

public static class Palettes

Remarks

This class exposes the following methods:

Predefined palettes are available via the Palette class properties (for example, see the Palette.BlueGreenPalette property).

Example

This example shows how to use the ListBoxControl to display a list of predefined palettes for a TreeMap.

using DevExpress.XtraTreeMap;
using System;
using System.Windows.Forms;
//...
private void OnFormLoad(object sender, EventArgs e) {
    listBoxControl1.DataSource = Palettes.GetNames();
    listBoxControl1.SelectedValueChanged += OnSelectedValueChanged;
}
private void OnSelectedValueChanged(object sender, EventArgs e) {
    TreeMapPaletteColorizerBase paletteColorizer = (TreeMapPaletteColorizerBase)treeMap1.Colorizer;
    paletteColorizer.Palette = Palettes.GetPalette(listBoxControl1.SelectedValue.ToString());
}

Related TreeMap API:

Inheritance

Object
Palettes
See Also