<?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 How to make Legend control refresh the info? in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125119#M534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can I make the Legend control refresh the label / image if I change the DisplayName and Renderer properties for a Layer? I've been able to do it by setting the Map to null, then setting it back again. But this resets the tree back to everything expanded. I just want it to update the info. Is this possible?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2013 20:47:41 GMT</pubDate>
    <dc:creator>GeorgeFaraj</dc:creator>
    <dc:date>2013-02-21T20:47:41Z</dc:date>
    <item>
      <title>How to make Legend control refresh the info?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125119#M534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can I make the Legend control refresh the label / image if I change the DisplayName and Renderer properties for a Layer? I've been able to do it by setting the Map to null, then setting it back again. But this resets the tree back to everything expanded. I just want it to update the info. Is this possible?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 20:47:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125119#M534</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-02-21T20:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Legend control refresh the info?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125120#M535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The legend is supposed to refresh itself automatically when a property of the layers changes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However I noticed a bug: when changing the 'DisplayName', the legend is not refreshed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround for now might be you to set the Label of the corresponding LayerItemViewModel when you change the DisplayName.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We'll try to get it fixed in the API ASAP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Concerning the renderer, I was not able to reproduce the issue. When changing the layer renderer, the legend seems to refresh (if you found out a use case where that doesn't happen,&amp;nbsp; a workaround might to call Legend.Refresh()).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reporting that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 07:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125120#M535</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2013-02-22T07:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Legend control refresh the info?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125121#M536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;The workaround for now might be you to set the Label of the corresponding LayerItemViewModel when you change the DisplayName.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An easier workaround might also be to set ShowLegend to false and then again to true after changing the DisplayName.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;layer.DisplayName= "newDisplayName"; layer.ShowLegend=false; layer.ShowLegend=true;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 07:58:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125121#M536</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2013-02-22T07:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Legend control refresh the info?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125122#M537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, Dominique, that workaround worked. I haven't tried changing the renderer yet, but I figured since the name didn't change, I might have problems with the renderer too. Glad that you could find the cause of the bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;George&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 15:28:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-make-legend-control-refresh-the-info/m-p/125122#M537</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-02-25T15:28:05Z</dc:date>
    </item>
  </channel>
</rss>

