XYSeries2D.CrosshairEnabled Property

Gets or sets a value that specifies whether a crosshair cursor is enabled for a 2D chart's series.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v20.1.dll


public bool? CrosshairEnabled { get; set; }
Public Property CrosshairEnabled As Boolean?

Property Value

Type Description

Null - the CrosshairEnabled property value is obtained from the parent's ChartControlBase.CrosshairEnabled property; True - a crosshair cursor is enabled for a series; False - a crosshair cursor is disabled.


Use the CrosshairEnabled property to activate (deactivate) a crosshair cursor at the level of a particular 2D XYSeries.

To show the crosshair's lines and labels, set the CrosshairOptions.ShowArgumentLine, CrosshairOptionsBase.ShowValueLine, CrosshairOptions.ShowArgumentLabels and CrosshairOptions.ShowValueLabels properties to true.

After that, it becomes possible to customize the crosshair cursor's appearance and position on a diagram via the ChartControl.CrosshairOptions property.

If you need to change the crosshair label appearance, it can be done via the XYSeries2D.CrosshairLabelPattern and XYSeries2D.CrosshairLabelTemplate properties.

The following table shows this property in action.

CrosshairEnabled=True (for all series) CrosshairEnabled=True (for two series only)
XYSeries - CrosshairEnabledForALL XYSeries - CrosshairEnabledExceptOneSeries

To learn more about the crosshair cursor, see the Crosshair Cursor topic.

See Also