Palettes Class
A class that allows you to access the list of predefined treemap palettes.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v24.2.dll
Declaration
Remarks
This class exposes the following methods:
- Palettes.GetNames - Returns a list of built-in palettes’ names.
- Palettes.GetPalette - Returns a palette by its name.
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:
- Palettes.GetNames - Returns a list of built-in palettes’ names.
- Palettes.GetPalette - Returns a palette by its name.
Inheritance
Object
Palettes
See Also