ArcGIS API for WPF - Library Reference
CopyrightText Property
See Also  Example Send comments on this topic
ESRI.ArcGIS.Client Namespace > ArcGISTiledMapServiceLayer Class : CopyrightText Property

Gets the copyright text information of an ArcGIS Server based ArcGISTiledMapServiceLayer web service.

Syntax

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

Example

How to use:

When the ArcGISTiledMapServiceLayer Initializes the CopyrightText 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 CopyrightText of an ArcGISTiledMapServiceLayer.

XAMLCopy Code
<Grid x:Name="LayoutRoot">
  
  <!-- Add a Map Control. -->
  <esri:Map Background="White" HorizontalAlignment="Left" Margin="0,180,0,0" Name="Map1" 
          VerticalAlignment="Top" Height="300" Width="400" >
  
    <!-- Define an ArcGISTiledMapServiceLayer. -->
    <esri:ArcGISTiledMapServiceLayer 
          Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsBasemap/MapServer"
          Initialized="ArcGISTiledMapServiceLayer_Initialized"/>
    
  </esri:Map>
  
  <!-- CopyrightText (Read Only). -->
  <sdk:Label Height="24" HorizontalAlignment="Left" Margin="0,88,0,0" Name="Label_CopyrightText" 
             VerticalAlignment="Top" Width="120" Content="CopyrightText:"/>
  <TextBox Height="69" HorizontalAlignment="Left" Margin="0,105,0,0" Name="TextBox_CopyrightText" 
           VerticalAlignment="Top" Width="400" TextWrapping="Wrap" />
  
  <!-- 
  As an alternative you could bind the ArcGISTiledMapServiceLayer.CopyrightText 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_CopyrightText" TextWrapping="Wrap"
           VerticalAlignment="Top" Width="400" Text="{Binding ElementName=Map1, Path=Layers[0].CopyrightText}"/>-->
  
  <!-- 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 ArcGISTiledMapServiceLayer Initializes the CopyrightText
       will be automatically populated in the TextBlock." />
      
</Grid>
C#Copy Code
private void ArcGISTiledMapServiceLayer_Initialized(object sender, System.EventArgs e)
{
  // Get the first layer in the Map. 
  ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer myArcGISTiledMapServiceLayer = null;
  myArcGISTiledMapServiceLayer = (ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)(Map1.Layers[0]);
  
  // CopyrightText (Read Only).
  // NOTE: The CopyrightText information is set in the Credits section on the General tab of the Data Frame 
  // Properties dialog in ArcMap.
  TextBox_CopyrightText.Text = myArcGISTiledMapServiceLayer.CopyrightText;
}
VB.NETCopy Code
Private Sub ArcGISTiledMapServiceLayer_Initialized(ByVal sender As System.Object, ByVal e As System.EventArgs)
  
  ' Get the first layer in the Map. 
  Dim myArcGISTiledMapServiceLayer As ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer
  myArcGISTiledMapServiceLayer = CType(Map1.Layers.Item(0), ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)
  
  ' CopyrightText (Read Only).
  ' NOTE: The CopyrightText information is set in the Credits section on the General tab of the Data Frame 
  ' Properties dialog in ArcMap.
  TextBox_CopyrightText.Text = myArcGISTiledMapServiceLayer.CopyrightText
  
End Sub

Remarks

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

Setting the ArcGISTiledMapServiceLayer.CopyrightText in Credits section of the Data Frame Properties dialog of ArcMap.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© ESRI, Inc. All Rights Reserved.