ColorValuePath in Windows Forms TreeMap

8 Jul 20261 minute to read

The ColorValuePath of the tree map control is a path to a field on the source object that serves as the “color” of the object.

Refer to the following code for specifying the color value path.

TreeMap TreeMap1 = new TreeMap();

TreeMap1.ItemsSource = data.PopulationDetails;

TreeMap1.ColorValuePath = "Growth";
Dim TreeMap1 As New TreeMap()

TreeMap1.ItemsSource = data.PopulationDetails

TreeMap1.ColorValuePath = "Growth"

NOTE

The specified field must be available in every subclass (object) defined in the hierarchical (nested) data collection.