All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Palettes.GetPalette(String) Method

Returns a palette by its name.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v20.1.dll

Declaration

public static Palette GetPalette(
    string name
)
Public Shared Function GetPalette(
    name As String
) As Palette

Parameters

Name Type Description
name String

The palette name.

Returns

Type Description
Palette

The palette with the name you pass. Returns null (Nothing in Visual Basic) if a palette with the given name is not found.

Examples

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:

See Also