Skip to main content
A newer version of this page is available. .

Palettes.GetNames() Method

Returns a list of built-in palettes’ names.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v20.2.dll

NuGet Package: DevExpress.TreeMap

Declaration

public static List<string> GetNames()

Returns

Type Description
List<String>

A list of palette names.

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.
See Also