WeightValuePath in Windows Forms TreeMap
29 Apr 2021 / 1 minute to read
WeightValuePath of the tree map control is a path to a field on the source object that serves as the “weight” of the object.
Refer to the following code for specifying the weight value path.
TreeMap TreeMap1 = new TreeMap(); TreeMap1.ItemsSource = data.PopulationDetails; TreeMap1.WeightValuePath = "Population";
The specified field must be available in every subclass (object) defined in the hierarchical (nested) data collection.