Show / Hide Table of Contents

Method ScaleSelectedElement

ScaleSelectedElement(double, double, MapPoint?)

Scales the selected element by the specified factors.

Declaration
public void ScaleSelectedElement(double scaleX, double scaleY, MapPoint? origin)
Parameters
Type Name Description
double scaleX

The scale factor along the x-axis. It can be positive or negative. It cannot be 0, or a non-numeric value.

double scaleY

The scale factor along the y-axis. It can be positive or negative. It cannot be 0, or a non-numeric value.

MapPoint origin

The point relative to which the geometry will be scaled. If null, or IsEmpty is true, the center of the extent of the SelectedElement is used.

Remarks

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. ScaleSelectedElement(double, double, MapPoint?) only supports scaling the xy-dimensions.

Positive scale factors greater than 1 increase the size of the Geometry, and positive factors between 0 and 1 reduce the size of the geometry. Negative scale factors produce a geometry reflected across the axes of the origin point. Negative factors less than -1 both reflect and increase the size of the geometry, and negative factors between -1 and 0 both reflect and reduce the size of the geometry.

Scaling a geometry or part with circular arc by different x and y factors changes the shape of the segments to no longer be circular. If storing the geometry as a feature in ArcGIS Online, as ArcGIS Online only supports circular arcs (SupportedCurveTypes) you may wish to restrict the scaling to uniform factors to preserve the circular shape.

Exceptions
Type Condition
InvalidOperationException

The GeometryEditor must be started and have a SelectedElement set in order to scale an element. Elements with a one-dimensional extent cannot be scaled - the following cannot be scaled: GeometryEditorMidVertex, GeometryEditorVertex, and GeometryEditorGeometry when Geometry is Point.

ArgumentException

scaleX and scaleX must be valid numeric values. They cannot be 0, NaN, or infinity.

See Also
MoveSelectedElement(double, double)
MoveSelectedElement(MapPoint)
RotateSelectedElement(double, MapPoint)
AllowScalingSelectedElement
Scale(Geometry, double, double, MapPoint)

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.