This document is archived and information here might be outdated.  Recommended version.


ITOCControl2.EnableLayerDragDrop Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IT > ITOCControl2 Interface > ITOCControl2.EnableLayerDragDrop Property
ArcGIS Developer Help

ITOCControl2.EnableLayerDragDrop Property

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(
void
);
[C++]
HRESULT put_EnableLayerDragDrop(
);

Product Availability

Available with ArcGIS Engine.

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:

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:

See Also

ITOCControl2 Interface