ArcGIS API for Windows Phone - Library Reference
Description Property
See Also  Example Send comments on this topic
ESRI.ArcGIS.Client Namespace > ArcGISDynamicMapServiceLayer Class : Description Property

Gets the description information of an ArcGIS Server based ArcGISDynamicMapServiceLayer web service.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Description As String
C# 
public string Description {get;}

Remarks

When authoring an ArcGISDynamicMapServiceLayer in ArcMap to publish an ArcGIS Server web service, the Description information is set in the Description section on the General tab of the Data Frame Properties dialog. See the following ArcMap screen shot:

Setting the ArcGISDynamicMapServiceLayer.Description in Description section of the Data Frame Properties dialog of ArcMap.

Example

How to use:

When the ArcGISDynamicMapServiceLayer Initializes the Description will be automatically populated in the TextBlock.

The XAML code in this example is used in conjunction with the code-behind (C# or VB.NET) to demonstrate the functionality.

The following screen shot corresponds to the code example in this page.

Showing the Description of an ArcGISDynamicMapServiceLayer.

XAMLCopy Code
<Grid x:Name="LayoutRoot">
  
  <!-- Add a Map Control. Set its Initial Extent to Deleware. -->
  <esri:Map Background="White" HorizontalAlignment="Left" Margin="0,180,0,0" Name="Map1" 
          VerticalAlignment="Top" Height="300" Width="400" Extent="-76.49,38.33,-74.37,39.92">
  
    <!-- Define an ArcGISDynamicMapServiceLayer. -->
    <esri:ArcGISDynamicMapServiceLayer 
          Url="http://sampleserver1.arcgisonline.com:80/arcgis/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer"
          Initialized="ArcGISDynamicMapServiceLayer_Initialized"/>
    
  </esri:Map>
  
  <!-- Description (Read Only). -->
  <sdk:Label Height="24" HorizontalAlignment="Left" Margin="0,88,0,0" Name="Label_Description" 
             VerticalAlignment="Top" Width="120" Content="Description:"/>
  <TextBox Height="69" HorizontalAlignment="Left" Margin="0,105,0,0" Name="TextBox_Description" 
           VerticalAlignment="Top" Width="400" TextWrapping="Wrap" />
  
  <!-- 
  As an alternative you could bind the ArcGISDynamicMapServiceLayer.Description directly to the
  TextBox.Text Property and not need to put any code in the code-behind for the 
  ArcGISDynamicMapServiceLayer.Initialized Event.
  -->
  <!--<TextBox Height="69" HorizontalAlignment="Left" Margin="0,105,0,0" Name="TextBox_Description" TextWrapping="Wrap"
           VerticalAlignment="Top" Width="400" Text="{Binding ElementName=Map1, Path=Layers[0].Descripton}"/>-->
  
  <!-- Provide the instructions on how to use the sample code. -->
  <TextBlock Height="52" HorizontalAlignment="Left" Name="TextBlock1" VerticalAlignment="Top" Width="400" 
       TextWrapping="Wrap" Text="When the ArcGISDynamicMapServiceLayer Initializes the Description
       will be automatically populated in the TextBlock." />
      
</Grid>
C#Copy Code
private void ArcGISDynamicMapServiceLayer_Initialized(object sender, System.EventArgs e)
{
  // Get the first layer in the Map. 
  ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer myArcGISDynamicMapServiceLayer = null;
  myArcGISDynamicMapServiceLayer = (ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer)(Map1.Layers[0]);
  
  // Description (Read Only).
  // NOTE: The Description information is set in the Description section on the General tab of the Data Frame 
  // Properties dialog in ArcMap.
  TextBox_Description.Text = myArcGISDynamicMapServiceLayer.Description;
}
VB.NETCopy Code
Private Sub ArcGISDynamicMapServiceLayer_Initialized(ByVal sender As System.Object, ByVal e As System.EventArgs)
  
  ' Get the first layer in the Map. 
  Dim myArcGISDynamicMapServiceLayer As ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer
  myArcGISDynamicMapServiceLayer = CType(Map1.Layers.Item(0), ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer)
  
  ' Description (Read Only).
  ' NOTE: The Description information is set in the Description section on the General tab of the Data Frame 
  ' Properties dialog in ArcMap.
  TextBox_Description.Text = myArcGISDynamicMapServiceLayer.Description
  
End Sub

Requirements

Target Platforms:Windows Phone 7

See Also

© ESRI, Inc. All Rights Reserved.