ESRI.ArcGIS.E2API Feedback via the User Forum
LayerCollection Class
See Also  Members   Example 
ESRI.ArcGIS.E2API Namespace : LayerCollection Class


The collection of layers in a View or a GroupLayer which has child layers.

Object Model


Syntax

Visual Basic (Declaration) 
<ComVisibleAttribute(False)>
<DefaultMemberAttribute("Item")>
Public NotInheritable Class LayerCollection 
Visual Basic (Usage)Copy Code
Dim instance As LayerCollection
C# 
[ComVisibleAttribute(false)]
[DefaultMemberAttribute("Item")]
public sealed class LayerCollection 

Example

This example demonstrates how you can use a LayerCollection to iterate the Layers added to the view in ArcGIS Explorer.
C#Copy Code
ESRI.ArcGIS.E2API.LayerCollection MyLayerCollection = _taskUI.E2.CurrentView.Layers; 
for (int i = 0; i = MyLayerCollection.Count -1; i= ++) 

  //Some Layers used internally by ArcGIS Explorer may return null 
  if (MyLayerCollection.GetLayer(i) != null) 
  { 
    System.Diagnostics.Debug.WriteLine(MyLayerCollection[i].Type); 
  } 
}
Visual BasicCopy Code
Dim MyLayerCollection As ESRI.ArcGIS.E2API.LayerCollection = _taskUI.E2.CurrentView.Layers
Dim i As Integer
For i = 0 To i MyLayerCollection.Count -1 Step i= + 1
  'Some Layers used internally by ArcGIS Explorer may return null
  If Not MyLayerCollection.GetLayer(i) Is Nothing Then
    System.Diagnostics.Debug.WriteLine(MyLayerCollection(i).Type)
  End If
Next

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.E2API.LayerCollection

Platforms

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

Version Information

This class was added to the E2API at version 1.0.0.348.

See Also