ChartControl.CustomDrawCrosshair Event
Occurs before crosshair items are drawn when the chart's contents are being drawn.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v14.2.dll
#Declaration
#Event Data
The CustomDrawCrosshair event's handler receives an argument of the CustomDrawCrosshairEventArgs type. The following properties provide information specific to this event:
Property | Description |
---|---|
Crosshair |
Gets the settings of crosshair axis label elements to customize their appearance. |
Crosshair |
|
Crosshair |
Gets the settings of a crosshair line element to customize its appearance (color, line style). |
Handled |
Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
Inherited from Routed |
Original |
Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
Inherited from Routed |
Routed |
Gets or sets the Routed |
Source |
Gets or sets a reference to the object that raised the event.
Inherited from Routed |
#Remarks
Use the CustomDrawCrosshair event to create a custom appearance for crosshair items.
#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.