ESRI.ArcGIS.ADF.IMS
LayerCollection Class
Members  See Also 
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace : LayerCollection Class




A ThreadSafeCollection of Layers.

Object Model

Syntax

Visual Basic (Declaration) 
<DefaultMemberAttribute("Item")>
<SerializableAttribute()>
Public Class LayerCollection 
   Inherits ThreadSafeCollection
Visual Basic (Usage)Copy Code
Dim instance As LayerCollection
C# 
[DefaultMemberAttribute("Item")]
[SerializableAttribute()]
public class LayerCollection : ThreadSafeCollection 

Example

Many examples in the Library Reference reference the LayerCollection of the map, including Remove and FeatureLayer.CreateSelectionLayer(Point, double, Renderer, string).

Remarks

Each MapView has a Layers property which references a LayerCollection. This collection can be managed with the methods in this class. Layers may be added (Add, AddRange(Layer[]), AddRange(LayerCollection), Insert), deleted (Remove, RemoveAt), and moved within the collection (MoveTo). Besides iterating through the collection to retrieve layers (this Property), you can also locate layers by name (FindByName(string), FindByName(string, int)).

A DataFrame also has a Layers property with a LayerCollection. That collection may not be modified. Only the visibility of layers within the collection may be changed.

The layer collection is a 0-based collection. Lower-numbered layers draw first, with the last layer in the collection drawing at the top of the map.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.ThreadSafeCollection
      ESRI.ArcGIS.ADF.IMS.Carto.Layer.LayerCollection

See Also

© 2010 All Rights Reserved.