Gets a collection of the descendant MapItems contained by the Folder; IMapItemParent objects are added to the collection before their associated ChildItems.

Namespace:  ESRI.ArcGISExplorer.Mapping

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public IEnumerable<MapItem> Descendants { get; }
Visual Basic (Declaration)
Public ReadOnly Property Descendants As IEnumerable(Of MapItem)

Field Value

An IEnumerable collection of all descendant MapItems in the Folder.

Remarks

This property enables you to retrieve a flattened collection of all items contained by the Folder, for example if your Folder contains a KmlLayer, the Descendants collection will contain the KmlLayer, and all of the KmlNodes contained by the KmlLayer.

The same holds true for any IMapItemParent object in the Folder: the IMapItemParent.ChildItems are included in the returned Descendants collection.

Use this property if you need to recurse all items in the Folder, including those that are not direct children of the Folder. In this respect, the Descendants property differs from Folder.ChildItems that only returns a collection of the Folders immediate children.

The order of the items in the returned collection is different to the order of items in the DescendantsBottomUp collection. Both properties return the same number of items but Descendants returns a collection where IMapItemParent objects are added before their associated ChildItems. Conversely using the DescendantsBottomUp property will return a collection where IMapItemParent objects are added after their associated ChildItems.

See Also