wpf-devexpress-dot-xpf-dot-treemap-dot-hierarchicalchartcontrolbase-e49ffe43.md
Occurs when items are added to or removed from the SelectedItems collection.
Namespace : DevExpress.Xpf.TreeMap
Assembly : DevExpress.Xpf.TreeMap.v25.2.dll
NuGet Package : DevExpress.Wpf.TreeMap
public event TreeMapSelectionChangedEventHandler SelectionChanged
Public Event SelectionChanged As TreeMapSelectionChangedEventHandler
The SelectionChanged event's data class is TreeMapSelectionChangedEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Selection | Returns the list of selected items. |
The following code uses the TreeMapSelectionChangedEventArgs.Selection property to get a selected item:
private void sunburst_SelectionChanged(object sender, DevExpress.Xpf.TreeMap.TreeMapSelectionChangedEventArgs e) {
MyModel selectedItem = (MyModel)e.Selection[0];
//Add your logic here.
}
Private Sub sunburst_SelectionChanged(ByVal sender As Object, ByVal e As DevExpress.Xpf.TreeMap.TreeMapSelectionChangedEventArgs)
Dim selectedItem As MyModel = CType(e.Selection(0), MyModel)
'Add your logic here.
End Sub
See Also
HierarchicalChartControlBase Class