Method RotateSelectedElement
RotateSelectedElement(double, MapPoint?)
Rotates the SelectedElement by the specified angle.
Declaration
public void RotateSelectedElement(double angle, MapPoint? origin)
Parameters
| Type | Name | Description |
|---|---|---|
| double | angle | The angle by which to rotate the selected element, counterclockwise, in degrees. |
| MapPoint | origin | The center of rotation. If |
Remarks
The angle of rotation is used in the form of the modulo of 360 degrees; for example rotating by 540 degrees is equivalent to rotating the by 180 degrees. A positive value corresponds to a counterclockwise rotation.
If the origin Point has a different SpatialReference than the associated MapView, the point will be reprojected before the geometry is rotated, using the default transformation.
Any z-value of the origin MapPoint is ignored. RotateSelectedElement(double, MapPoint?)
only supports rotations in the xy-plane.
If SelectedElement is a GeometryEditorVertex, or a GeometryEditorGeometry of type Point, and the origin parameter is null (or is at the same location as the selected element), then rotating the
selected element has no effect.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The GeometryEditor must be started and have a SelectedElement set in order to rotate an element. GeometryEditorMidVertex elements cannot be rotated. |
See Also
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 200.3 - 200.8 |
| .NET | 200.3 - 300.0 |
| .NET Windows | 200.3 - 300.0 |
| .NET Android | 200.3 - 300.0 |
| .NET iOS | 200.3 - 300.0 |
| .NET Framework | 200.3 - 200.8 |
| UWP | 200.3 - 200.8 |