Back to Devexpress

HierarchicalChartControlBase.SelectionChanged Event

wpf-devexpress-dot-xpf-dot-treemap-dot-hierarchicalchartcontrolbase-e49ffe43.md

latest2.2 KB
Original Source

HierarchicalChartControlBase.SelectionChanged Event

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

Declaration

csharp
public event TreeMapSelectionChangedEventHandler SelectionChanged
vb
Public Event SelectionChanged As TreeMapSelectionChangedEventHandler

Event Data

The SelectionChanged event's data class is TreeMapSelectionChangedEventArgs. The following properties provide information specific to this event:

PropertyDescription
SelectionReturns the list of selected items.

Remarks

The following code uses the TreeMapSelectionChangedEventArgs.Selection property to get a selected item:

csharp
private void sunburst_SelectionChanged(object sender, DevExpress.Xpf.TreeMap.TreeMapSelectionChangedEventArgs e) {
    MyModel selectedItem = (MyModel)e.Selection[0];
    //Add your logic here.
}
vb
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

HierarchicalChartControlBase Members

DevExpress.Xpf.TreeMap Namespace