<?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: UniqueValueRenderer change polygon fill color dynamically in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223807#M5650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Xaria,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to replicate the issue using your code with minor tweaks.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Changes to FeatureLayer:&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://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/FeatureServer/2" rel="nofollow" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/FeatureServer/2&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OutFields="symbolname."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Changes to UniqueValueRenderer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attribute="symbolname"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Changed Value property of each UniqueValueInfo to code values the FeatureServer expects (see FeatureLayer's Url)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:UniqueValueInfo Value="Residential - Very Low Density"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Symbol="{StaticResource MyRedFillSymbol}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:UniqueValueInfo Value="Residential - Low Density"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Symbol="{StaticResource MyYellowFillSymbol}" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:UniqueValueRenderer.Infos&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code-behind (FeatureLayer_MouseLeftButtonDown)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Graphic g = e.Graphic;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;g.Attributes["symbolname"] = "Residential - Very Low Density";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As soon as the symbolname attribute is changed, I see the graphic's fill color change from Yellow to Red if I clicked on a graphic that had Yellow/"Residential - Low Density".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;The only difference from your code is that you were using Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://MyMapURL/MapServer/0" rel="nofollow" target="_blank"&gt;http://MyMapURL/MapServer/0&lt;/A&gt;&lt;SPAN&gt; (A MapServer). I also tried using MapServer and the fill color would still change dynamically after changing the attribute, but ofcourse on page refresh or application restart, the graphic changes back to its original color because the FeatureLayer is read-only. Do you not see the color change at all?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems there's no problem with your code. The Attribute property of the UniqueValueRenderer must match a field in the FeatureServer and the Value property of each UniqueValueRender.Info must be a type/value that field accepts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also listen to EndSaveEdits and SaveEditsFailed to see if a graphic is updated.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jennifer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jul 2010 15:37:56 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2010-07-22T15:37:56Z</dc:date>
    <item>
      <title>UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223785#M5628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How to change the fill color of a particular polygon at runtime?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jul 2010 03:16:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223785#M5628</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-16T03:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223786#M5629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This thread &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/6481-Dynamically-change-color-of-a-symbol?highlight=symbol+binding"&gt;http://forums.arcgis.com/threads/6481-Dynamically-change-color-of-a-symbol?highlight=symbol+binding&lt;/A&gt;&lt;SPAN&gt; could help (by replacing markersymbol by fillsymbol).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jul 2010 13:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223786#M5629</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-07-16T13:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223787#M5630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My problem lies in retrieving the polygon from feature layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The feature layer has multiple polygons. Also, I have a table stored in SQL database which stores status values of these polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When the status changes the color should change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So suppose if for polygon 1 status is 1 color is green,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;then when the status for polygon changes to 0 the color should be red.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I apply the color change to polygon 1wiithout changing the color of other polygons?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jul 2010 00:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223787#M5630</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-19T00:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223788#M5631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looks like a standard usage of an UniqueValueRenderer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create two symbols (in your resources), one green and one red.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In your UniqueValueRenderer, affect the red symbol to value 0 and the green one to value 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The symbol will automatically change when the status value changes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See sample &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#RenderersXAML"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#RenderersXAML&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jul 2010 08:22:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223788#M5631</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-07-19T08:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223789#M5632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So does that mean Status should be defined as an attribute of the feature?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the status changes dynamically, and the status is passed to the WPF application via WCF operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So how to assign the new attribute value?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jul 2010 09:02:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223789#M5632</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-19T09:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223790#M5633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;So does that mean Status should be defined as an attribute of the feature?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it's the easiest way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;But the status changes dynamically, and the status is passed to the WPF application via WCF operation.&lt;BR /&gt;So how to assign the new attribute value?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;You can add attributes at runtime :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
if (graphic.Attributes.ContainsKey("Status"))
&amp;nbsp; graphic.Attributes["Status"] = status;
else
&amp;nbsp; graphic.Attributes.Add("Status", status);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223790#M5633</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T10:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223791#M5634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes, it's the easiest way. &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;You can add attributes at runtime :&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
if (graphic.Attributes.ContainsKey("Status"))
&amp;nbsp; graphic.Attributes["Status"] = status;
else
&amp;nbsp; graphic.Attributes.Add("Status", status);
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When should the attribute be added? During layer Initialization? Or do I need to add a task?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223791#M5634</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2021-12-11T10:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223792#M5635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The attributes are not displayed in the WPF application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attributes like ObjectId, RefName, text, txtMemo, status&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but the feature layer has attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RefName, Shape_Length and Shape_area&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ans as usual the web application is showing the attributes under the identify feature correctly!!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;:mad:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 06:32:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223792#M5635</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-20T06:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223793#M5636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have added attributes to the map in ArcMap, and the REST service also displays all the attributes as fields. The web application displays all attributes in the identify table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But WPF Application does not display those attributes. WHAT could be the reason? What should I check please guide me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 15:56:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223793#M5636</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-20T15:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223794#M5637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you set the OutFields property on the FeatureLayer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 16:49:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223794#M5637</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-07-20T16:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223795#M5638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Did you set the OutFields property on the FeatureLayer?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yeah I missed that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 00:56:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223795#M5638</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-21T00:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223796#M5639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;But I still don't understand how to dynamically apply the renderer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The status of all graphic when the map is loaded is 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The status changes after the application starts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So when I set the graphic.Attributes["status"] to newstatus value, it is not rendered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How to refresh renderer or apply new renderer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 01:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223796#M5639</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-21T01:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223797#M5640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It should be automatic when you change the value of an attribute which is used in the renderer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How looks your renderer which is using the attribute 'status'?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 07:09:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223797#M5640</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-07-21T07:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223798#M5641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; &amp;lt;esriSymbols:SimpleFillSymbol x:Key="MyYellowFillSymbol" Fill="YellowGreen" BorderBrush="Transparent" BorderThickness="2" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esriSymbols:SimpleFillSymbol x:Key="MyRedFillSymbol" Fill="Red" BorderBrush="Transparent" BorderThickness="2" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:UniqueValueRenderer x:Key="MyUniqueValueRenderer" Attribute="Status" &amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:UniqueValueRenderer.Infos&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:UniqueValueInfo Value="Off" Symbol="{StaticResource MyRedFillSymbol}" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:UniqueValueInfo Value="On" Symbol="{StaticResource MyYellowFillSymbol}"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:UniqueValueRenderer.Infos&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:UniqueValueRenderer&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the feature layer is&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;esri:FeatureLayer ID="towers" Url="http://MyMapURL/MapServer/0"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where="1=1" Renderer="{StaticResource MyUniqueValueRenderer}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown"&amp;gt;
 &amp;lt;esri:FeatureLayer.OutFields&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sys:String&amp;gt;RefName&amp;lt;/sys:String&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sys:String&amp;gt;Status&amp;lt;/sys:String&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sys:String&amp;gt;Text&amp;lt;/sys:String&amp;gt;
 &amp;lt;/esri:FeatureLayer.OutFields&amp;gt;
&amp;lt;/esri:FeatureLayer&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223798#M5641</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2021-12-11T10:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223799#M5642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;So when I set the graphic.Attributes["status"] to newstatus value, it is not rendered.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;lt;esri:UniqueValueRenderer x:Key="MyUniqueValueRenderer" Attribute="Status" &amp;gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Looks like you are using &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;tatus in code and &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;tatus in XAML.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attribute names are case sensitive.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 11:27:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223799#M5642</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-07-21T11:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223800#M5643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;NOoooooooooooooooooooooooooo&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it is case-sensitive, and I am using "Status" in code behind.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 12:29:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223800#M5643</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-21T12:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223801#M5644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Might be that the status is initialized with coded values such as 0 and 1&amp;nbsp;&amp;nbsp; and your renderer is using strings "On"/"Off".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 14:23:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223801#M5644</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-07-21T14:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223802#M5645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, that is not the case either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The status is defined as String "On"/"Off" and I am assigning the same in code behind.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 14:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223802#M5645</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2010-07-21T14:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223803#M5646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; private void FeatureLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Graphic feature = e.Graphic;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.Attributes["Status"] = "On";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I have in code behind.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What to do??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:54:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223803#M5646</guid>
      <dc:creator>xariaD</dc:creator>
      <dc:date>2021-12-11T10:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer change polygon fill color dynamically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223804#M5647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tested with your code and I didn't get any problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I don't understand:confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess you have verified that your event handler 'FeatureLayer_MouseLeftButtonDown' is executed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Which ArcGIS SL API version are you using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 09:09:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/uniquevaluerenderer-change-polygon-fill-color/m-p/223804#M5647</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-07-22T09:09:08Z</dc:date>
    </item>
  </channel>
</rss>

