ESRI.ArcGIS.ADF.IMS
Visible Property
See Also  Example Send Feedback
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace > Layer Class : Visible Property




Gets or sets a property to determine whether the layer is visible on the map.

Syntax

Visual Basic (Declaration) 
Public Overridable Property Visible As Boolean
Visual Basic (Usage)Copy Code
Dim instance As Layer
Dim value As Boolean
 
instance.Visible = value
 
value = instance.Visible
C# 
public virtual bool Visible {get; set;}

Example

The following example retrieves a feature layer from the MapView's layers collection, and sets the layer to visible.
C#Copy Code
FeatureLayer citiesLayer = (FeatureLayer) mapView.Layers.FindByName("Cities");
citiesLayer.Visible = true;
Visual BasicCopy Code
Dim citiesLayer As FeatureLayer = CType(mapView.Layers.FindByName("Cities"), FeatureLayer)
citiesLayer.Visible = True

Remarks

If true, the layer will be visible when the map is drawn, unless scale factors are set and the map is not within the visible scale range (see MinScale and MaxScale).

Default is True.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.