ChartControlBase.CrosshairEnabled Property

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

Namespace: DevExpress.Xpf.Charts

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

Declaration

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

Property Value

Type Description
Nullable<Boolean>

Null - 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.

Remarks

Use the CrosshairEnabled property to activate (deactivate) a crosshair cursor at the level of a ChartControl.

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

You can also change the content of a crosshair label, via the XYSeries2D.CrosshairLabelPattern property and crosshair label appearance using the XYSeries2D.CrosshairLabelTemplate property.

The following table shows this property in action.

CrosshairEnabled=True CrosshairEnabled=False
ChartControl - CrosshairEnabled - True ChartControl - CrosshairEnabled - False
NOTE

The CrosshairOptionsBase.ShowCrosshairLabels and CrosshairOptions.ShowArgumentLine properties are enabled by default.

To show series point markers on a diagram, set the MarkerVisible property for a particular series to true (e.g., LineSeries2D.MarkerVisible).

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

See Also