<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Newbie question: how to add feature layer symbol to a layer list? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72109#M1757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I adapted the following example to make layer list for a map with 3 FeatureLayer and 1 ArcGISTiledMapServiceLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The layer list works fine but does not show the symbol for each FeatureLayer. I found that I don't know how to adapt the above example and add the symbol graphics. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you tell me some idea? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following is the map layers I am in my XAML code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;***********************************************************&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;esri:Map.Layers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" rel="nofollow" target="_blank"&gt;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer&lt;/A&gt;&lt;SPAN&gt;" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="Warning"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/2" rel="nofollow" target="_blank"&gt;http://sampleserver.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/2&lt;/A&gt;&lt;SPAN&gt;" Color="Yellow"/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="Wind"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/0" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Color="Brown"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;esri:FeatureLayer ID="Stream Gauges"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/1" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/1&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Color="BlueViolet"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/esri:Map.Layers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;***********************************************************************&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Aug 2010 10:29:16 GMT</pubDate>
    <dc:creator>SuiHuang</dc:creator>
    <dc:date>2010-08-31T10:29:16Z</dc:date>
    <item>
      <title>Newbie question: how to add feature layer symbol to a layer list?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72109#M1757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I adapted the following example to make layer list for a map with 3 FeatureLayer and 1 ArcGISTiledMapServiceLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LayerList&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The layer list works fine but does not show the symbol for each FeatureLayer. I found that I don't know how to adapt the above example and add the symbol graphics. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you tell me some idea? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following is the map layers I am in my XAML code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;***********************************************************&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;esri:Map.Layers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" rel="nofollow" target="_blank"&gt;http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer&lt;/A&gt;&lt;SPAN&gt;" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="Warning"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/2" rel="nofollow" target="_blank"&gt;http://sampleserver.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/2&lt;/A&gt;&lt;SPAN&gt;" Color="Yellow"/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="Wind"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/0" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Color="Brown"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;esri:FeatureLayer ID="Stream Gauges"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/1" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/1&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Color="BlueViolet"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/esri:Map.Layers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;***********************************************************************&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 10:29:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72109#M1757</guid>
      <dc:creator>SuiHuang</dc:creator>
      <dc:date>2010-08-31T10:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: how to add feature layer symbol to a layer list?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72110#M1758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use the FeatureSymbol attribute of the FeatureLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/help/index.html"&gt;http://help.arcgis.com/en/webapi/silverlight/help/index.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 10:45:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72110#M1758</guid>
      <dc:creator>GopiP</dc:creator>
      <dc:date>2010-08-31T10:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: how to add feature layer symbol to a layer list?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72111#M1759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Use the FeatureSymbol attribute of the FeatureLayer.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/help/index.html"&gt;http://help.arcgis.com/en/webapi/silverlight/help/index.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi SriGopi:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I understand that in some place of the code I should be able to do a binding on the FeatureSymbol property of the FeatureLayer. I also found the reference of FeatureSymbol&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~FeatureSymbol.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~FeatureSymbol.html&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; However, after trying around I still could find out how to use the FeatureSymbol property. It is in Symbol class of ESRI.ArcGIS.Client.Symbols Namespace, I don't know how to put it into the StackPanel and arrange it with other controls such as text blocks and checkboxes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Any further suggestion?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 12:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72111#M1759</guid>
      <dc:creator>SuiHuang</dc:creator>
      <dc:date>2010-08-31T12:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: how to add feature layer symbol to a layer list?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72112#M1760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The REST API doesn't expose legend information, so there is no simple way to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are hitting an ArcGIS Server 10 (your example aboe is not!), FeatureLayers do get render information from the server, but you will have to go through each symbol defined on the renderer (there could be more whan one symbol depending on what service you are hitting) and set these symbols on the Symbol property for the ESRI.ArcGIS.Client.Toolkit.Primitives.SymbolDisplay control.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 18:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72112#M1760</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-08-31T18:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: how to add feature layer symbol to a layer list?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72113#M1761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;However, after trying around I still could find out how to use the FeatureSymbol property. It is in Symbol class of ESRI.ArcGIS.Client.Symbols Namespace, I don't know how to put it into the StackPanel and arrange it with other controls such as text blocks and checkboxes.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As Morten said, you can use the ESRI.ArcGIS.Client.Toolkit.Primitives.SymbolDisplay control.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example the following code will give the attached result:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
&amp;lt;Grid x:Name="LayoutRoot" &amp;gt;
&amp;lt;Grid.Resources&amp;gt;
&amp;lt;esri:FillSymbol x:Name="FillSymbol" Fill="Yellow" /&amp;gt;
&amp;lt;esri:SimpleMarkerSymbol x:Name="MarkerSymbol0" Color="Brown" Style="Circle" /&amp;gt;
&amp;lt;esri:SimpleMarkerSymbol x:Name="MarkerSymbol1" Color="BlueViolet" Style="Circle"/&amp;gt;
&amp;lt;/Grid.Resources&amp;gt;
&amp;lt;esri:Map x:Name="MyMap" Extent="-120,20,-90,60"&amp;gt;
&amp;lt;esri:Map.Layers&amp;gt;
&amp;lt;esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /&amp;gt;
&amp;lt;esri:FeatureLayer ID="Warning" FeatureSymbol="{StaticResource FillSymbol}" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/2"/&amp;gt;
&amp;lt;esri:FeatureLayer ID="Wind" FeatureSymbol="{StaticResource MarkerSymbol0}" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/0"/&amp;gt;
&amp;lt;esri:FeatureLayer ID="Stream Gauges" FeatureSymbol="{StaticResource MarkerSymbol1}" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyFeedSample/MapServer/1"/&amp;gt;
&amp;lt;/esri:Map.Layers&amp;gt;
&amp;lt;/esri:Map&amp;gt;
&amp;lt;Border Background="#77919191" BorderThickness="1" CornerRadius="5"
HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="20" Padding="5" BorderBrush="Black" &amp;gt;
 
&amp;lt;ListBox x:Name="MyList" ItemsSource="{Binding ElementName=MyMap, Path=Layers}"&amp;gt;
&amp;lt;ListBox.ItemTemplate&amp;gt;
&amp;lt;DataTemplate&amp;gt;
&amp;lt;StackPanel Orientation="Horizontal"&amp;gt;
&amp;lt;!--Layer visibility checkbox--&amp;gt;
&amp;lt;CheckBox IsChecked="{Binding Visible, Mode=TwoWay}" /&amp;gt;
&amp;lt;!-- Symbol --&amp;gt;
&amp;lt;esriPrimitives:SymbolDisplay Symbol="{Binding FeatureSymbol}" Margin="5,0,0,0" Height="18" Width="25" VerticalAlignment="Center" HorizontalAlignment="Center"/&amp;gt;
&amp;lt;!--Opacity slider--&amp;gt;
&amp;lt;Slider Margin="0,0,0,0" Minimum="0" Maximum="1" Width="30" 
Value="{Binding Opacity, Mode=TwoWay}" Height="18" /&amp;gt;
&amp;lt;!--Layer name--&amp;gt;
&amp;lt;TextBlock Text="{Binding ID, Mode=OneWay}" Margin="5,0,0,0" &amp;gt; 
&amp;lt;!-- Tooltip on hover--&amp;gt;
&amp;lt;ToolTipService.ToolTip&amp;gt;
&amp;lt;StackPanel MaxWidth="400"&amp;gt;
&amp;lt;TextBlock FontWeight="Bold" Text="{Binding CopyrightText}" TextWrapping="Wrap" /&amp;gt;
&amp;lt;TextBlock Text="{Binding Description}" TextWrapping="Wrap" /&amp;gt;
&amp;lt;/StackPanel&amp;gt;
&amp;lt;/ToolTipService.ToolTip&amp;gt;
&amp;lt;/TextBlock&amp;gt;
&amp;lt;/StackPanel&amp;gt;
&amp;lt;/DataTemplate&amp;gt;
&amp;lt;/ListBox.ItemTemplate&amp;gt;
&amp;lt;/ListBox&amp;gt;
&amp;lt;/Border&amp;gt;
�??
�??
&amp;lt;/Grid&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72113#M1761</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-10T22:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question: how to add feature layer symbol to a layer list?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72114#M1762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you dbroux, SharpGIS and SriGopi!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Sep 2010 02:30:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/newbie-question-how-to-add-feature-layer-symbol-to/m-p/72114#M1762</guid>
      <dc:creator>SuiHuang</dc:creator>
      <dc:date>2010-09-05T02:30:59Z</dc:date>
    </item>
  </channel>
</rss>

