Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    Palettes Class

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

    Namespace: DevExpress.XtraTreeMap

    Assembly: DevExpress.XtraTreeMap.v25.1.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