Class SunburstSelectionChangedEventArgs
The SunburstSelectionChangedEventArgs class contains information about the selection change that occurs in a SfSunburstChart.
Inheritance
Namespace: Syncfusion.Maui.SunburstChart
Assembly: Syncfusion.Maui.SunburstChart.dll
Syntax
public class SunburstSelectionChangedEventArgs : EventArgs
Remarks
This event argument provides access to the segment that was previously selected, the segment that is newly selected or deselected, and a flag indicating whether the segment is currently selected.
Usage Example:
sunburstChart.SelectionChanged += OnSelectionChanged;
void OnSelectionChanged(object sender, SunburstSelectionChangedEventArgs e)
{
if (e.IsSelected)
{
Debug.WriteLine($"Selected Index: {e.NewSegment.Index}");
}
else
{
Debug.WriteLine($"Old selected Index: {e.OldSegment.Index}");
}
}
Properties:
- OldSegmentThe segment that was previously selected before the current selection change.
- NewSegmentThe segment that is newly selected or deselected as a result of the interaction.
- IsSelectedIndicates whether the NewSegment is selected or deselected.
Constructors
SunburstSelectionChangedEventArgs(SunburstSegment, SunburstSegment, Boolean)
Initializes a new instance of the SunburstSelectionChangedEventArgs class.
Declaration
public SunburstSelectionChangedEventArgs(SunburstSegment oldSegment, SunburstSegment newSegment, bool isSelected)
Parameters
Type | Name | Description |
---|---|---|
SunburstSegment | oldSegment | The previously selected segment. |
SunburstSegment | newSegment | The newly selected segment. |
System.Boolean | isSelected | Whether the segment is selected or deselected. |
Properties
IsSelected
Gets a value indicating whether the segment was selected (true
) or deselected (false
).
Declaration
public bool IsSelected { get; }
Property Value
Type |
---|
System.Boolean |
NewSegment
Gets the segment that is newly selected or deselected.
Declaration
public SunburstSegment NewSegment { get; }
Property Value
Type | Description |
---|---|
SunburstSegment | The newly selected or deselected segment. |
OldSegment
Gets the segment that was previously selected before the current selection change.
Declaration
public SunburstSegment OldSegment { get; }
Property Value
Type | Description |
---|---|
SunburstSegment | The previously selected segment. |