Method MoveSelectedElement
MoveSelectedElement(MapPoint)
Moves the selected element to the specified location.
Declaration
public void MoveSelectedElement(MapPoint newPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| MapPoint | newPoint | The new location for the selected element. |
Remarks
If SelectedElement is a GeometryEditorVertex, then the location of the vertex is moved to the given
point. If the SelectedElement is any other type of GeometryEditorElement, then the center of the
element is moved to the given point.
If newPoint is z-aware (HasZ = true) and Geometry is not currently z-aware, this will change the Geometry
to be z-aware, if it is not already.
If SelectedElement is z-aware and newPoint is not z-aware, then the current z-value(s) of
SelectedElement will remain unchanged.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The GeometryEditor must be started, and have a SelectedElement set, in order to move an element. This exception is also thrown if the selected element is a GeometryEditorMidVertex. |
| ArgumentException | Empty points cannot be used to move vertices of the Geometry. |
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 |
MoveSelectedElement(double, double)
Moves the selected element by the specified deltas.
Declaration
public void MoveSelectedElement(double deltaX, double deltaY)
Parameters
| Type | Name | Description |
|---|---|---|
| double | deltaX | The amount to move the selected element along the x-axis, in the units of the associated MapView spatial reference. |
| double | deltaY | The amount to move the selected element along the y-axis, in the units of the associated MapView spatial reference. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The GeometryEditor must be started, and have a SelectedElement set, in order to move an element. This exception is also thrown if the selected element is a GeometryEditorMidVertex. |
| ArgumentException |
|
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 |