Skip to main content

ChartControl.QueryChartCursor Event

Occurs when there is a request to display the cursor on the chart control.

Namespace: DevExpress.Xpf.Charts

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

#Declaration

public event QueryChartCursorEventHandler QueryChartCursor

#Event Data

The QueryChartCursor event's handler receives an argument of the QueryChartCursorEventArgs type. The following properties provide information specific to this event:

Property Description
Cursor Gets or sets the mouse cursor currently being shown for the chart.
CursorImage Provides an image for the custom cursor.
CursorImageOffset Specifies an image offset for a custom cursor on a chart diagram.
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 RoutedEventArgs.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
Position Gets or sets a value that specifies the position of a custom cursor on the chart's diagram.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

#Remarks

In the QueryChartCursor event handler, you can provide custom cursors for your chart in various circumstances (e.g. when a chart is being scrolled or zoomed).

#Examples

This example shows how to display a custom cursor when the mouse pointer is hovering over the chart control.

To accomplish this task, handle the ChartControl.QueryChartCursor event and assign your custom image (e.g., a BitmapImage object loaded from application resources) to the QueryChartCursorEventArgs.CursorImage property.

Note that you need to include your image in the project and set the QueryChartCursorEventArgs.Cursor property to None to see the custom image in the chart control.

See Also