Back to Devexpress

QueryCursorEventArgs Class

windowsforms-devexpress-dot-xtramap-c913f68a.md

latest2.5 KB
Original Source

QueryCursorEventArgs Class

Provides data for the QueryCursor event.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public class QueryCursorEventArgs :
    CancelEventArgs
vb
Public Class QueryCursorEventArgs
    Inherits CancelEventArgs

QueryCursorEventArgs is the data class for the following events:

Remarks

The following example shows how to substitute the cursor displayed when a user scrolls the map with the Arrow cursor:

csharp
using DevExpress.XtraMap;
using System;
using System.Windows.Forms;

namespace MapQueryCursor {
    public partial class Form1 : Form {
        private void Form1_Load(object sender, EventArgs e) {
            //...
            mapControl1.QueryCursor += OnMapQueryCursor;
        }
        private void OnMapQueryCursor(object sender, QueryCursorEventArgs e) {
            if (e.Action == QueryCursorAction.MoveMap) {
                e.Cursor = Cursors.Arrow;
            }
        }
    }
}
vb
Imports DevExpress.XtraMap
Imports System
Imports System.Windows.Forms

Namespace MapQueryCursor
    Public Partial Class Form1
        Inherits Form

        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
            '...
            mapControl1.QueryCursor += AddressOf OnMapQueryCursor
        End Sub

        Private Sub OnMapQueryCursor(ByVal sender As Object, ByVal e As QueryCursorEventArgs)
            If e.Action Is QueryCursorAction.MoveMap Then
                e.Cursor = Cursors.Arrow
            End If
        End Sub
    End Class
End Namespace

Inheritance

Object EventArgs CancelEventArgs QueryCursorEventArgs

See Also

QueryCursorEventArgs Members

DevExpress.XtraMap Namespace