ArcObjects Library Reference (Controls)  

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(
  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

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