ESRI.ArcGIS.ADF.IMS
Name Property
See Also  Example
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.

See Also

© 2010 All Rights Reserved.