Show / Hide Table of Contents

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
AllowMovingSelectedElement

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.3 - 200.8
.NET200.3 - 300.0
.NET Windows200.3 - 300.0
.NET Android200.3 - 300.0
.NET iOS200.3 - 300.0
.NET Framework200.3 - 200.8
UWP200.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

deltaX and deltaY must be valid numeric values. They cannot be NaN or infinity.

See Also
AllowMovingSelectedElement

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.3 - 200.8
.NET200.3 - 300.0
.NET Windows200.3 - 300.0
.NET Android200.3 - 300.0
.NET iOS200.3 - 300.0
.NET Framework200.3 - 200.8
UWP200.3 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.