Class
ChartSelectionBehavior

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:

cs-api-definition
public class ChartSelectionBehavior : ChartBehavior

Inheritance: objectInheritanceContextPropagatorChartBehaviorChartSelectionBehavior

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

Constructors

ChartSelectionBehavior()

Declaration

cs-api-definition
public ChartSelectionBehavior()

Fields

DataPointSelectionModeProperty

Identifies the DataPointSelectionMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DataPointSelectionModeProperty

Field Value

DependencyProperty

HitTestMarginProperty

Identifies the HitTestMargin dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HitTestMarginProperty

Field Value

DependencyProperty

Properties

DataPointSelectionMode

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

Declaration

cs-api-definition
public ChartSelectionMode DataPointSelectionMode { get; set; }

Property Value

ChartSelectionMode

HitTestMargin

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

Declaration

cs-api-definition
public Thickness HitTestMargin { get; set; }

Property Value

Thickness

Methods

ClearSelection(bool, bool)

Removes the current selection within the chart.

Declaration

cs-api-definition
public void ClearSelection(bool dataPoints = true, bool chartSeries = true)

Parameters

dataPoints

bool

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

chartSeries

bool

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

CreateInstanceCore()

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

Declaration

cs-api-definition
protected override Freezable CreateInstanceCore()

Returns

Freezable

The new instance.

Overrides InheritanceContextPropagator.CreateInstanceCore()

OnAttached()

Called when the behavior is added to the chart control.

Declaration

cs-api-definition
protected override void OnAttached()

Overrides ChartBehavior.OnAttached()

OnChartTemplateChanged(Canvas, Canvas)

Called when chart template is changed.

Declaration

cs-api-definition
protected override void OnChartTemplateChanged(Canvas oldAdornerContainer, Canvas adornerContainer)

Parameters

oldAdornerContainer

Canvas

The old adorner layer.

adornerContainer

Canvas

The adorner layer.

Overrides ChartBehavior.OnChartTemplateChanged(Canvas, Canvas)

OnDetached()

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

Declaration

cs-api-definition
protected override void OnDetached()

Overrides ChartBehavior.OnDetached()

OnSelectionChanged(ChartSelectionChangedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnSelectionChanged(ChartSelectionChangedEventArgs args)

Parameters

args

ChartSelectionChangedEventArgs

The ChartSelectionChangedEventArgs instance containing the event data.

Events

SelectionChanged

Occurs when the chart selection has changed.

Declaration

cs-api-definition
public event EventHandler<ChartSelectionChangedEventArgs> SelectionChanged

Event Value

EventHandler<ChartSelectionChangedEventArgs>