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




Gets or sets the Layer name.

Syntax

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

Example

The following example assigns a new name to an existing map layer. This code assumes an existing MapView object.
C#Copy Code
FeatureLayer citiesLayer = (FeatureLayer) mapView.Layers.FindByName("Cities");
citiesLayer.Name = "Cities Layer";
Visual BasicCopy Code
Dim citiesLayer As FeatureLayer = CType(mapView.Layers.FindByName("Cities"), FeatureLayer)
citiesLayer.Name = "Cities Layer"

Remarks

The layer name is an alias typically used to present a user-friendly display for users. It need not be the same as the layer ID. Layer names can contain spaces.

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.