We find the standard tool mouse pointer, the crosshair, is hard to see for some of our users, we would like to be able to customize this mouse pointer when our custom tool is selected. Is this possible?
Solved! Go to Solution.
Hi Evan,
You can set the "Cursor" property of your custom tool to change the standard cursor.
internal class CustomMapTool : MapTool
{
public CustomMapTool()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Rectangle;
SketchOutputMode = SketchOutputMode.Map;
//A custom cursor file as an embedded resource
var cursorEmbeddedResource = new Cursor(new MemoryStream(MapExploration.Resource1.red_cursor));
//A built in system cursor
var systemCursor = System.Windows.Input.Cursors.ArrowCD;
//Set the "CustomMapTool's" Cursor property to either one of the cursors defined above
Cursor = cursorEmbeddedResource;
//or
Cursor = systemCursor;
}
....
Hi Evan,
You can set the "Cursor" property of your custom tool to change the standard cursor.
internal class CustomMapTool : MapTool
{
public CustomMapTool()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Rectangle;
SketchOutputMode = SketchOutputMode.Map;
//A custom cursor file as an embedded resource
var cursorEmbeddedResource = new Cursor(new MemoryStream(MapExploration.Resource1.red_cursor));
//A built in system cursor
var systemCursor = System.Windows.Input.Cursors.ArrowCD;
//Set the "CustomMapTool's" Cursor property to either one of the cursors defined above
Cursor = cursorEmbeddedResource;
//or
Cursor = systemCursor;
}
....
Perfect, just what i was looking for. Thanks alot Uma.
Is there a way to do this type of customization with built in tools? I would like to be able to change the cross hair cursor that appears when using linked views to, like the original poster, better see the cursor.