<?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: Changing Feature Symbol in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-feature-symbol/m-p/114407#M2860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to choose one or the other as noted in this help doc: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.GraphicsLayer~Renderer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.GraphicsLayer~Renderer.html&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can, however try to clone the existing renderer as defined by the service and modify the symbol base on your preference. Your custom symbol will then have VisualStates for MouseOver or Selected. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
void l_Initialized(object sender, EventArgs e)
{
 FeatureLayer l = sender as FeatureLayer;
 if (l.Renderer is UniqueValueRenderer)
 {
&amp;nbsp; var current = l.Renderer as UniqueValueRenderer;
&amp;nbsp; var renderer = new UniqueValueRenderer() { Attribute = current.Attribute };
&amp;nbsp; foreach (var info in current.Infos)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; var newInfo = new UniqueValueInfo()
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; Description = info.Description,
&amp;nbsp;&amp;nbsp;&amp;nbsp; Label = info.Label,
&amp;nbsp;&amp;nbsp;&amp;nbsp; Value = info.Value,
&amp;nbsp;&amp;nbsp;&amp;nbsp; //TODO: clone existing symbol or overwrite with new symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; Symbol = this.LayoutRoot.Resources["MyCustomSymbol"]&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp; renderer.Infos.Add(newInfo);
&amp;nbsp; }
&amp;nbsp; l.Renderer = renderer;
 }
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sample shows how to create custom symbols: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:46:52 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2021-12-11T06:46:52Z</dc:date>
    <item>
      <title>Changing Feature Symbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-feature-symbol/m-p/114406#M2859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an option to change the render for only one feature on the map, without changing the feature layer renderer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For exmple to change the polyline color on mouse over/click.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Betty&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 11:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-feature-symbol/m-p/114406#M2859</guid>
      <dc:creator>BettyKeren</dc:creator>
      <dc:date>2011-02-16T11:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Feature Symbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-feature-symbol/m-p/114407#M2860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to choose one or the other as noted in this help doc: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.GraphicsLayer~Renderer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.GraphicsLayer~Renderer.html&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can, however try to clone the existing renderer as defined by the service and modify the symbol base on your preference. Your custom symbol will then have VisualStates for MouseOver or Selected. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
void l_Initialized(object sender, EventArgs e)
{
 FeatureLayer l = sender as FeatureLayer;
 if (l.Renderer is UniqueValueRenderer)
 {
&amp;nbsp; var current = l.Renderer as UniqueValueRenderer;
&amp;nbsp; var renderer = new UniqueValueRenderer() { Attribute = current.Attribute };
&amp;nbsp; foreach (var info in current.Infos)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; var newInfo = new UniqueValueInfo()
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; Description = info.Description,
&amp;nbsp;&amp;nbsp;&amp;nbsp; Label = info.Label,
&amp;nbsp;&amp;nbsp;&amp;nbsp; Value = info.Value,
&amp;nbsp;&amp;nbsp;&amp;nbsp; //TODO: clone existing symbol or overwrite with new symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; Symbol = this.LayoutRoot.Resources["MyCustomSymbol"]&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp; renderer.Infos.Add(newInfo);
&amp;nbsp; }
&amp;nbsp; l.Renderer = renderer;
 }
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sample shows how to create custom symbols: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:46:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-feature-symbol/m-p/114407#M2860</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T06:46:52Z</dc:date>
    </item>
  </channel>
</rss>

