<?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 Map Legend Selected Item Improvements in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538412#M13786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible to get a more robust mechanism to extract the currently selected item from the Legend control?&amp;nbsp; I've been fighting with the Tree class as well as the "LayerItemViewModel" or "LegendItemViewModel" to extract out which layer from the collection of layers loaded into the Map Viewer control is currently selected.&amp;nbsp; I would like to determine the Layer Type (Dynamic Layer, Feature Layer, etc.) as well as the Layer ID.&amp;nbsp; This would enable me to set the various other controls like Identify control, Editor control, etc.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My biggest challenge is that I can't figure out a practical way to determine the "Parent Layer" of a Feature layer if that feature layer has styles assigned to it?&amp;nbsp; The LegendTree could potentially provide me a way to grab the Parent Layer ID using something like this "itm.LegendTree.LayerItems.Items(itm.LegendTree.LayerItemsMode)" but it's not an exposed item?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Apr 2011 00:30:48 GMT</pubDate>
    <dc:creator>JDog</dc:creator>
    <dc:date>2011-04-12T00:30:48Z</dc:date>
    <item>
      <title>Map Legend Selected Item Improvements</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538412#M13786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible to get a more robust mechanism to extract the currently selected item from the Legend control?&amp;nbsp; I've been fighting with the Tree class as well as the "LayerItemViewModel" or "LegendItemViewModel" to extract out which layer from the collection of layers loaded into the Map Viewer control is currently selected.&amp;nbsp; I would like to determine the Layer Type (Dynamic Layer, Feature Layer, etc.) as well as the Layer ID.&amp;nbsp; This would enable me to set the various other controls like Identify control, Editor control, etc.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My biggest challenge is that I can't figure out a practical way to determine the "Parent Layer" of a Feature layer if that feature layer has styles assigned to it?&amp;nbsp; The LegendTree could potentially provide me a way to grab the Parent Layer ID using something like this "itm.LegendTree.LayerItems.Items(itm.LegendTree.LayerItemsMode)" but it's not an exposed item?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 00:30:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538412#M13786</guid>
      <dc:creator>JDog</dc:creator>
      <dc:date>2011-04-12T00:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Map Legend Selected Item Improvements</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538413#M13787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I would like to determine the Layer Type (Dynamic Layer, Feature Layer, etc.) as well as the Layer ID. This would enable me to set the various other controls like Identify control, Editor control, etc. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From any legend item, you can get the underlying layer with :&amp;nbsp;&amp;nbsp; legendItem.Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then with this layer you can access any layer property&amp;nbsp; such as&amp;nbsp; the layerID, the layerType,.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt; I can't figure out a practical way to determine the "Parent Layer" of a Feature layer if that feature layer has styles assigned to it?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure what you mean by 'Parent Layer' and 'has styles', but perhaps usage of legendItem.Layer will fix this issue as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 06:11:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538413#M13787</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-04-12T06:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Map Legend Selected Item Improvements</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538414#M13788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By Parent Layer, I mean a Feature Layer could have styles that get represented by child nodes in the treeview under a given Feature Layer.&amp;nbsp; The styles are selectable but return a different object type (can't recall if it returns LegendItem or LayerItem?).&amp;nbsp; I haven't been able to figure out how to get the Feature Layer details from these items?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 03:30:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538414#M13788</guid>
      <dc:creator>JDog</dc:creator>
      <dc:date>2011-04-14T03:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Map Legend Selected Item Improvements</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538415#M13789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I see the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is nothing exposed by the API that returns the parent item of a legend item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You have to go through the legend tree with a program similar to that returning the selected item (or you can extend that program to return at the same time the selected item and the parent item).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 05:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538415#M13789</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-04-14T05:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Map Legend Selected Item Improvements</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538416#M13790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to programmatically set the selected layer?&amp;nbsp; I want to check a particular checkbox depending on user selection.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 19:09:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538416#M13790</guid>
      <dc:creator>Reynaldde_Castro</dc:creator>
      <dc:date>2011-06-27T19:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Map Legend Selected Item Improvements</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538417#M13791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;Is there a way to programmatically set the selected layer?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are talking about selecting a layer in the legend control, you can do that by code by using the 'IsSelected' property of the LayerItemViewModel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This sample : &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates"&gt;&lt;SPAN style="color:#0000ff;"&gt;http://help.arcgis.com/en/webapi/sil...dWithTemplates&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; demonstrates how to use the 'IsCollapsed' property but you can use the IsSelected property the same way (except than with the default template, the legend supports one selected item only).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 08:08:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-legend-selected-item-improvements/m-p/538417#M13791</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-06-29T08:08:22Z</dc:date>
    </item>
  </channel>
</rss>

