Back to Devexpress

Rotation

windowsforms-402192-controls-and-libraries-map-control-end-user-features-rotation.md

latest1.4 KB
Original Source

Rotation

  • Dec 14, 2020

Users can rotate the map as shown in the image below. Hold down the right mouse button and move the mouse in a circle to rotate the map. Double-click the map with the right mouse button to reset the rotation angle:

Use the MapControl.EnableRotation property to enable or disable map rotation:

csharp
mapControl1.EnableRotation = true;
vb
mapControl1.EnableRotation = True

You can use the following API members to rotate the map programmatically:

  • The Angle property specifies the rotation angle. The code below rotates the map 20 degrees:

  • C#

  • VB.NET

csharp
mapControl1.Angle = 20;
vb
mapControl1.Angle = 20
csharp
mapControl1.RotateAt(90, mapControl1.CenterPoint);
vb
mapControl1.RotateAt(90, mapControl1.CenterPoint)