Skip to main content

CrosshairAxisLabelElement Class

Defines the appearance of the crosshair value and crosshair argument labels when custom drawing a crosshair cursor using the ChartControl.CustomDrawCrosshair event.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v14.2.dll

#Declaration

[NonCategorized]
public class CrosshairAxisLabelElement :
    CrosshairLabelElementBase

#Returned By

The CrosshairElement.AxisLabelElement property returns an instance of CrosshairAxisLabelElement.

#Remarks

To get access to the appearance properties of the CrosshairAxisLabelElement object, use the CrosshairElement.AxisLabelElement property when dealing with crosshair value labels and the CustomDrawCrosshairEventArgs.CrosshairAxisLabelElements property for the crosshair argument labels if the CrosshairOptions.SnapMode property is set to NearestArgument.

When the CrosshairOptions.SnapMode property is set to NearestValue, these properties will affect other crosshair axis labels. For instance, the CustomDrawCrosshairEventArgs.CrosshairAxisLabelElements property will change the appearance of the crosshair value labels in this case.

For more information on crosshair cursors, see Crosshair Cursor.

#Examples

This example shows how to provide a custom appearance for the crosshair cursor using the ChartControl.CustomDrawCrosshair event. This event is invoked when you click the Custom Draw Crosshair Cursor button on the form.

If you wish to display crosshair axis lines and labels on a chart before custom drawing the crosshair cursor, set the CrosshairOptions.ShowArgumentLabels, CrosshairOptions.ShowArgumentLine, CrosshairOptions.ShowValueLabels and CrosshairOptions.ShowValueLine properties to true.

Note that the customization of the crosshair cursor is provided for the CrosshairOptions.SnapMode property set to NearestArgument.

#Inheritance

Object
CrosshairLabelElementBase
CrosshairAxisLabelElement
See Also