windowsforms-devexpress-dot-xtramap-79030391.md
Lists actions that make the map control switch the cursor image.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public enum QueryCursorAction
Public Enum QueryCursorAction
| Name | Description | Image |
|---|---|---|
Default |
A user does not perform any actions on the map.
|
|
| SizeNESW |
A user uses the top-right or bottom-left corner of a shape’s bounding box to resize the shape in the editor‘s Transform mode.
|
|
| SizeNS |
A user uses the top or bottom border of a shape’s bounding box to resize the shape in the editor‘s Transform mode.
|
|
| SizeNWSE |
A user uses the top-left or bottom-right corner of a shape’s bounding box to resize the shape in the editor‘s Transform mode.
|
|
| SizeWE |
A user uses the left or right border of a shape’s bounding box to resize the shape in the editor‘s Transform mode.
|
|
| SizeAll |
A map shape is scaled in four directions (north, south, east, and west).
|
|
| HyperlinkHover |
A user hovers the mouse pointer over a hyperlink.
|
|
| NavigationUIHover |
A user hovers the mouse pointer over an element on the navigation panel.
|
|
| NavigationUIPressed |
A user moves a track bar’s thumb on the navigation panel.
|
|
| MoveMap |
A user scrolls the map.
|
|
| MoveMiniMap |
A user scrolls the mini map.
|
|
| RotateMap |
A user rotates the map.
|
|
| EditorAddPoint |
A user hovers over a map shape outline and can add a new point to the shape in the editor‘s Edit mode.
|
|
| EditorMovePoint |
A user hovers over a map shape point and can move it in the editor‘s Edit mode.
|
|
| EditorRotation |
A user hovers over a map shape’s rotation handle and can rotate the shape in the editor‘s Transform mode.
|
|
| EditorMoveItem |
A user hovers over a map shape and can move the item in the editor‘s Transform mode.
|
|
| Restore |
Assigns the previously displayed image to the cursor.
| |
The following properties accept/return QueryCursorAction values:
The following example shows how to substitute the cursor displayed when a user scrolls the map with the Arrow cursor:
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;
}
}
}
}
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
See Also