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


ITOCControl2.LayerVisibilityEdit 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.LayerVisibilityEdit Property
ArcGIS Developer Help

ITOCControl2.LayerVisibilityEdit Property

Layer visibility editing state.

[Visual Basic .NET]
Public Property LayerVisibilityEdit As esriTOCControlEdit
[C#]
public esriTOCControlEdit LayerVisibilityEdit {get; set;}
[C++]
HRESULT get_LayerVisibilityEdit(
void
);
[C++]
HRESULT put_LayerVisibilityEdit(
);

Product Availability

Available with ArcGIS Engine.

Description

Use LabelVisibilityEdit to determine whether layer visibility is controlled programmatically or through user interaction with the check boxes. By default LayerVisibility is automatic.

Set the property to automatic to toggle layer visibility through user interaction with the check boxes.

Set the property to manual to toggle layer visibility programmatcially.

Remarks

If a layer has MinimumScale and MaximumScale thresholds set, its check box will become disabled when the layer is not displayed.

[C#]
axTOCControl1.ActiveView.FocusMap.get_Layer(0).Visible = false;
axMapControl1.Refresh(esriViewDrawPhase.esriViewGeography,null,null);
[Visual Basic .NET]
AxTOCControl1.ActiveView.FocusMap.Layer(0).Visible = False
AxMapControl1.Refresh(esriViewDrawPhase.esriViewGeography)

See Also

ITOCControl2 Interface