New to Telerik UI for WPFStart a free 30-day trial

Represents a behavior that changes the IsSelected state of data points and series depending on user input.

Definition

Namespace:Telerik.Windows.Controls.ChartView

Assembly:Telerik.Windows.Controls.Chart.dll

Syntax:

C#
public class ChartSelectionBehavior : ChartBehavior

Inheritance: objectInheritanceContextPropagatorChartBehaviorChartSelectionBehavior

Inherited Members ChartBehavior.OnUnloaded()ChartBehavior.ChartChartBehavior.AdornerContainerInheritanceContextPropagator.FreezeCore(bool)

Constructors

C#
public ChartSelectionBehavior()

Fields

Identifies the DataPointSelectionMode dependency property.

C#
public static readonly DependencyProperty DataPointSelectionModeProperty

HitTestMarginProperty

DependencyProperty

Identifies the HitTestMargin dependency property.

C#
public static readonly DependencyProperty HitTestMarginProperty

Properties

Gets or sets the ChartSelectionMode that controls the selection behavior of the data points within the chart series.

C#
public ChartSelectionMode DataPointSelectionMode { get; set; }

HitTestMargin

Thickness

Gets or sets the Thickness struct that will be used when calculating the hit test rectangle.

C#
public Thickness HitTestMargin { get; set; }

Methods

Removes the current selection within the chart.

C#
public void ClearSelection(bool dataPoints = true, bool chartSeries = true)
Parameters:dataPointsbool

True to clear the selected state of each data point, false otherwise.

chartSeriesbool

True to clear the selected state of each chart series, false otherwise.

When implemented in a derived class, creates a new instance of the Freezable derived class.

C#
protected override Freezable CreateInstanceCore()
Returns:

Freezable

The new instance.

Overrides: InheritanceContextPropagator.CreateInstanceCore()

Called when the behavior is added to the chart control.

C#
protected override void OnAttached()

Overrides: ChartBehavior.OnAttached()

Called when chart template is changed.

C#
protected override void OnChartTemplateChanged(Canvas oldAdornerContainer, Canvas adornerContainer)
Parameters:oldAdornerContainerCanvas

The old adorner layer.

adornerContainerCanvas

The adorner layer.

Overrides: ChartBehavior.OnChartTemplateChanged(Canvas, Canvas)

This method is called when this behavior is removed from the chart.

C#
protected override void OnDetached()

Overrides: ChartBehavior.OnDetached()

Raises the event.

C#
protected virtual void OnSelectionChanged(ChartSelectionChangedEventArgs args)
Parameters:argsChartSelectionChangedEventArgs

The ChartSelectionChangedEventArgs instance containing the event data.

Events

Occurs when the chart selection has changed.

C#
public event EventHandler<ChartSelectionChangedEventArgs> SelectionChanged