ArcGIS Pro 2.7 API Reference Guide
MoveLayer Method (Map)

ArcGIS.Desktop.Mapping Namespace > Map Class : MoveLayer Method
A layer.
Position where the layer should move to.
Moves a layer to a different position in the table of contents. This method must be called on the MCT. Use QueuedTask.Run
Syntax
public void MoveLayer( 
   Layer layer,
   int position
)
Public Sub MoveLayer( _
   ByVal layer As Layer, _
   ByVal position As Integer _
) 

Parameters

layer
A layer.
position
Position where the layer should move to.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Map Class
Map Members