Skip to main content
A newer version of this page is available. .

ChartControl.CrosshairEnabled Property

Gets or sets a value that specifies whether a crosshair cursor is enabled for a chart.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v22.1.UI.dll

NuGet Package: DevExpress.Win.Charts

Declaration

public DefaultBoolean CrosshairEnabled { get; set; }

Property Value

Type Description
DefaultBoolean

Default - a crosshair cursor’s state (enabled/disabled) is automatically determined based on the type of diagram currently displayed on a chart; True - a crosshair cursor is enabled for a chart; False - a crosshair cursor is disabled.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

Use the CrosshairEnabled property to activate (deactivate) the crosshair cursor at the level of a ChartControl. Use the SeriesBase.CrosshairEnabled and Indicator.CrosshairEnabled properties to enable (disable) the crosshair cursor for specific series and indicators.

To customize the crosshair cursor appearance and position options, use the ChartControl.CrosshairOptions property.

The following image shows the enabled crosshair cursor with the CrosshairOptions.ShowArgumentLabels, CrosshairOptions.ShowValueLabels, CrosshairOptions.ShowArgumentLine and CrosshairOptions.ShowValueLine set to true.

CrosshairEnabledForChart

To customize the crosshair cursor label content, use the SeriesBase.CrosshairLabelPattern property for series and the Indicator.CrosshairLabelPattern property — for indicators.

For more information on how to use a crosshair cursor, see the Crosshair Cursor topic.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CrosshairEnabled property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also