<?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 Re: Legend / Layers in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-layers/m-p/126844#M3173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think this is related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/18999-How-do-I-get-the-selected-LegendItem"&gt;http://forums.arcgis.com/threads/18999-How-do-I-get-the-selected-LegendItem&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LayerItemViewModel gives you access to Layer property: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client.Toolkit~ESRI.ArcGIS.Client.Toolkit.Primitives.LayerItemViewModel_members.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client.Toolkit~ESRI.ArcGIS.Client.Toolkit.Primitives.LayerItemViewModel_members.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2011 22:35:19 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2011-03-15T22:35:19Z</dc:date>
    <item>
      <title>Legend / Layers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-layers/m-p/126843#M3172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I noticed in the Silverlight Viewer 1.0 the legend has a feature where you can select a layer and then that layer becomes the active layer for selecting features, querying, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering how to take advantage of this?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a drop down list so the user can select an active layer and then work with the query or spatial selection tools but I would like to eliminate my drop down list and just take advantage of the legend active layer function.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an example or documentation on how to grab the active/selected/highlighted layer in the legend&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now my code looks like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;QueryTask queryTask = new QueryTask((Layers.SelectedItem as FeatureLayer).Url);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I would like to drop the ((Layers.SelectedItem as FeatureLayer).Url) and replace it with some code that is bound to the active layer in the legend.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 16:08:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-layers/m-p/126843#M3172</guid>
      <dc:creator>DavidAshton</dc:creator>
      <dc:date>2011-03-15T16:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Legend / Layers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-layers/m-p/126844#M3173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think this is related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/18999-How-do-I-get-the-selected-LegendItem"&gt;http://forums.arcgis.com/threads/18999-How-do-I-get-the-selected-LegendItem&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LayerItemViewModel gives you access to Layer property: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client.Toolkit~ESRI.ArcGIS.Client.Toolkit.Primitives.LayerItemViewModel_members.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client.Toolkit~ESRI.ArcGIS.Client.Toolkit.Primitives.LayerItemViewModel_members.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 22:35:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-layers/m-p/126844#M3173</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-03-15T22:35:19Z</dc:date>
    </item>
  </channel>
</rss>

