Back to Devexpress

HeatmapControl.QueryChartCursor Event

wpf-devexpress-dot-xpf-dot-charts-dot-heatmap-dot-heatmapcontrol-0fdabece.md

latest5.6 KB
Original Source

HeatmapControl.QueryChartCursor Event

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

Namespace : DevExpress.Xpf.Charts.Heatmap

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public event QueryChartCursorEventHandler QueryChartCursor
vb
Public Event QueryChartCursor As QueryChartCursorEventHandler

Event Data

The QueryChartCursor event's data class is QueryChartCursorEventArgs. The following properties provide information specific to this event:

PropertyDescription
CursorGets or sets the mouse cursor currently being shown for the chart.
CursorImageProvides an image for the custom cursor.
CursorImageOffsetSpecifies an image offset for a custom cursor on a chart diagram.
HandledGets 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.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
PositionGets or sets a value that specifies the position of a custom cursor on the chart’s diagram.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
SourceGets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

MethodDescription
InvokeEventHandler(Delegate, Object)When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs.
OnSetSource(Object)When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs.

Remarks

In the QueryChartCursor event handler, you can provide custom cursors for the heatmap in various circumstances (for example, when the heatmap is scrolled or zoomed).

xaml
<dxh:HeatmapControl QueryChartCursor="heatmapControl_QueryChartCursor">
<!--...-->
</dxh:HeatmapControl>
csharp
using System;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media.Imaging;
//...
    private void heatmapControl_QueryChartCursor(object sender, QueryChartCursorEventArgs e) {
        e.Cursor = Cursors.None;
        e.CursorImage = new BitmapImage(new Uri(@"D:\CustomCursor\cursor.png", UriKind.RelativeOrAbsolute));
    }
vb
Imports System.Windows.Media.Imaging
'...
    Private Sub heatmapControl_QueryChartCursor(ByVal sender As Object, ByVal e As QueryChartCursorEventArgs)
        e.Cursor = Cursors.None
        e.CursorImage = New BitmapImage(New Uri("D:\CustomCursor\cursor.png", UriKind.RelativeOrAbsolute))
    End Sub

See Also

HeatmapControl Class

HeatmapControl Members

DevExpress.Xpf.Charts.Heatmap Namespace