Indicates if layers can be dragged and dropped in the control.
[Visual Basic .NET] Public Property EnableLayerDragDrop As Boolean
[C#] public bool EnableLayerDragDrop {get; set;}
[C++]
HRESULT get_EnableLayerDragDrop(
VARIANT_BOOL* newVal
);
[C++]
HRESULT put_EnableLayerDragDrop(
VARIANT_BOOL newVal
);
[C++]Parameters
newVal [out, retval] newVal is a parameter of type VARIANT_BOOL newVal [in] newVal is a parameter of type VARIANT_BOOL
Product Availability
Description
Determines whether layers can be dragged and dropped in the TOCControl. This property if false by default. When EnableLayerDragDrap is true, layers can be dragged and dropped as follows:
- within a map
- within, to and from a group layer
- between maps
- between maps in different TOCControl's
- between maps in different TOCControl's in different application
- between ArcMap and ArcCatalog and a TOCControl
By default when dragging and dropping a layer within a map, the layer will be moved within the map to the drop location. To copy the layer, rather than move it press the CTRL key while dragging and dropping.
By default when dragging and dropping a layer between maps, a copy of the layer will be added into the map the layer is dropped into. To move the dragged layer, rather than copy it press the CTRL key while dragging and dropping.
Remarks
Layers can not be dragged and dropped in the following cases:
- When the Buddy of a TOCControl does not suppport a layer type. For example, a TIN layer cannot be dropped into a TOCControl buddied to a GlobeControl, because a GlobeControl does not support TIN layers.
- When the layer is a child of a composite layer, that does not support IGroupLayer. For example, the child layers of a MapServerLayer have their order fixed by the server and cannot be reordered using drag and drop.