QueryCursorEventArgs.Action Property
Returns the action that makes the map control change the cursor icon.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.2.dll
NuGet Package: DevExpress.Win.Map
#Declaration
public QueryCursorAction Action { get; }
#Property Value
Type | Description |
---|---|
Query |
Specifies a user action. |
Available values:
Name | Description | Image |
---|---|---|
Default | A user does not perform any actions on the map. |
|
Size |
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. |
|
Size |
A user uses the top or bottom border of a shape’s bounding box to resize the shape in the editor‘s Transform mode. |
|
Size |
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. |
|
Size |
A user uses the left or right border of a shape’s bounding box to resize the shape in the editor‘s Transform mode. |
|
Size |
A map shape is scaled in four directions (north, south, east, and west). |
|
Hyperlink |
A user hovers the mouse pointer over a hyperlink. |
|
Navigation |
A user hovers the mouse pointer over an element on the navigation panel. |
|
Navigation |
A user moves a track bar’s thumb on the navigation panel. |
|
Move |
A user scrolls the map. |
|
Move |
A user scrolls the mini map. |
|
Rotate |
A user rotates the map. |
|
Editor |
A user hovers over a map shape outline and can add a new point to the shape in the editor‘s Edit mode. |
|
Editor |
A user hovers over a map shape point and can move it in the editor‘s Edit mode. |
|
Editor |
A user hovers over a map shape’s rotation handle and can rotate the shape in the editor‘s Transform mode. |
|
Editor |
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. |
#Remarks
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;
}
}
}
}