<?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 with Templates sample in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270147#M7050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;How can I tell for sure what API version I'm using. If I look at the references in my VS project for ESRI.ArcGIS.Client, it says version 2.1.0.446 &lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You are using the 2.1 version, so that explains you don't see the Tag property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The version should be 2.2.0.629.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you already installed the 2.2 version, check that your project is referencing the dlls under %programfiles%/ESRI SDKs/Silverlight/v2.2&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2011 15:18:01 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2011-07-18T15:18:01Z</dc:date>
    <item>
      <title>Legend with Templates sample</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270142#M7045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We implemented the Legend with templates sample in our app. Is there any way to remove the opacity from certain layers? I would like to have it availble for only certain feature classes not all of them.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 15:05:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270142#M7045</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2011-07-15T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Legend with Templates sample</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270143#M7046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;I would like to have it availble for only certain feature classes not all of them. &lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can initialize by code the tag property with the expected visibility for the opacity slider:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: black;"&gt;&lt;SPAN style="color:blue;"&gt;private&lt;/SPAN&gt; &lt;SPAN style="color:blue;"&gt;void&lt;/SPAN&gt; Legend_Refreshed(&lt;SPAN style="color:blue;"&gt;object&lt;/SPAN&gt; sender, &lt;SPAN style="color:#2b91af;"&gt;Legend&lt;/SPAN&gt;.&lt;SPAN style="color:#2b91af;"&gt;RefreshedEventArgs&lt;/SPAN&gt; e)&lt;/SPAN&gt;
&lt;SPAN style="color: black;"&gt;{&lt;/SPAN&gt;
&lt;SPAN style="color: black;"&gt;e.LayerItem.Tag= IsOpacityNeeded(e.LayerItem.Layer) ? Visibility.Visible : Viisbility.Collapsed ;&lt;/SPAN&gt;
&lt;SPAN style="color: black;"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you can retemplate the maplayeritem to use the Tag as slider visibility:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:blue;"&gt;&lt;SPAN style="color:blue;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;Slider&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; Maximum&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"1"&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; Value&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;="{&lt;/SPAN&gt;&lt;SPAN style="color:#a31515;"&gt;Binding&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; Layer&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;Opacity&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; Mode&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;TwoWay&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; Width&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"50"&lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt; VerticalAlignment&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt;"Center"&lt;/SPAN&gt;&lt;/SPAN&gt;
 &lt;SPAN style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: red; font-size: 3;"&gt;Visibility="{Binding Tag}"&lt;/SPAN&gt;&lt;SPAN style="color:blue;"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270143#M7046</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T13:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Legend with Templates sample</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270144#M7047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm assuming that the IsOpacityNeeded is a function that will return Visibility.Visible or .Collapsed if it's needed. Right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, my main problem is in the Legend_Refreshed section, I get an error for e.LayerItem.Tag saying LayerItemViewModel does not contain a definition for Tag...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would have assumed that I could set a Tag property in the xaml when I add a map layer to the MapControl but there is no Tag property there either.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 12:56:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270144#M7047</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2011-07-18T12:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Legend with Templates sample</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270145#M7048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm assuming that the IsOpacityNeeded is a function that will return Visibility.Visible or .Collapsed if it's needed. Right?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right. Actually, it just returns true or false but Visible or Collapsed is OK as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;But, my main problem is in the Legend_Refreshed section, I get an error for e.LayerItem.Tag saying LayerItemViewModel does not contain a definition for Tag...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Which ArcGIS SL version are you using? I think the Tag property has been added in 2.2.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 15:02:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270145#M7048</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-07-18T15:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Legend with Templates sample</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270146#M7049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using 2.2. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just got off of a chat session with an ESRI tech and they couldn't get the .Tag to be recgonized either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It shows up in the help documentation as being available at &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;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But neither of us could get it to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I tell for sure what API version I'm using. If I look at the references in my VS project for ESRI.ArcGIS.Client, it says version 2.1.0.446&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 15:10:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270146#M7049</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2011-07-18T15:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Legend with Templates sample</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270147#M7050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;How can I tell for sure what API version I'm using. If I look at the references in my VS project for ESRI.ArcGIS.Client, it says version 2.1.0.446 &lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You are using the 2.1 version, so that explains you don't see the Tag property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The version should be 2.2.0.629.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you already installed the 2.2 version, check that your project is referencing the dlls under %programfiles%/ESRI SDKs/Silverlight/v2.2&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 15:18:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270147#M7050</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-07-18T15:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Legend with Templates sample</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270148#M7051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sometimes I feel like such an idiot! THANKS! Working fine now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 15:24:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/legend-with-templates-sample/m-p/270148#M7051</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2011-07-18T15:24:35Z</dc:date>
    </item>
  </channel>
</rss>

