<?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: Temporary symbol for a graphic in Feature Layer in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/temporary-symbol-for-a-graphic-in-feature-layer/m-p/74805#M1817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a work item for RendererTakesPrecedence=False not respected when graphic.Symbol is null. At this point, your graphic must already have a symbol before you set RendererTakesPrecedence to false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your UniqueValueRenderer has a DefaultSymbol defined and your graphic.Attribute does not match any of the UniqueValueInfo.Value, the graphic will use DefaultSymbol. You can try this with the following SDK 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;SPAN&gt;. Comment one of the UniqueValueInfo and replace with DefaultSymbol. In this solution, you can set graphic.Attribute to a value that will make it fall back to default symbol. When you're ready to have the graphic use the service-defined symbol, update its attribute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another approach is to use GraphicsLayer above your FeatureLayer. Your GraphicsLayer can have a SimpleRenderer with the symbol you use for this specific case. When you're ready to have the graphic use the service-defined renderer, you can add the graphic to your FeatureLayer and remove the temporary GraphicsLayer above it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Nov 2011 14:46:45 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2011-11-12T14:46:45Z</dc:date>
    <item>
      <title>Temporary symbol for a graphic in Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/temporary-symbol-for-a-graphic-in-feature-layer/m-p/74804#M1816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a point feature layer in my map; the renderer defined in the MXD and Map Service is a Unique Value renderer. In a particular case, I want to have one single point to be drawn with a different symbol during a specific process, and then have the symbol set back to be drawn by the default renderer. So this is what I do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I set: &lt;/SPAN&gt;&lt;STRONG&gt;RendererTakesPrecedence="False" &lt;/STRONG&gt;&lt;SPAN&gt;in XAML.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I set the symbol on the graphic (which is originally NULL):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;myGraphic.Symbol = new SimpleMarkerSymbol()
&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; Style = SimpleMarkerSymbol.SimpleMarkerStyle.Diamond,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Size = 8,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Color = new SolidColorBrush(Colors.Green)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;A zoom to the point takes place at the same moment and the new symbol is displayed correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Later on I finish my process and I set the Symbol of the graphic back to null:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;myGraphic.Symbol = null;
myPointLayer.Refresh();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that I had to call Refresh on the layer. Then the original symbol generated from the renderer is displayed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem occurs the next time I want to assign the custom symbol on the same graphic: it just doesn't get displayed and the point dissapears completely from the map. Calling Refresh() after setting the symbol doesn't help. When I set the symbol back to null it shows up again as expected. If I try a different graphic, same thing happens; this is: I can only see the custom symbol the first time I use it on a particular graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I supposed to do something else or is it a bug?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for any help. Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Orlando&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2011 20:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/temporary-symbol-for-a-graphic-in-feature-layer/m-p/74804#M1816</guid>
      <dc:creator>OrlandoCarvajal</dc:creator>
      <dc:date>2011-11-11T20:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Temporary symbol for a graphic in Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/temporary-symbol-for-a-graphic-in-feature-layer/m-p/74805#M1817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a work item for RendererTakesPrecedence=False not respected when graphic.Symbol is null. At this point, your graphic must already have a symbol before you set RendererTakesPrecedence to false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your UniqueValueRenderer has a DefaultSymbol defined and your graphic.Attribute does not match any of the UniqueValueInfo.Value, the graphic will use DefaultSymbol. You can try this with the following SDK 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;SPAN&gt;. Comment one of the UniqueValueInfo and replace with DefaultSymbol. In this solution, you can set graphic.Attribute to a value that will make it fall back to default symbol. When you're ready to have the graphic use the service-defined symbol, update its attribute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another approach is to use GraphicsLayer above your FeatureLayer. Your GraphicsLayer can have a SimpleRenderer with the symbol you use for this specific case. When you're ready to have the graphic use the service-defined renderer, you can add the graphic to your FeatureLayer and remove the temporary GraphicsLayer above it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Nov 2011 14:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/temporary-symbol-for-a-graphic-in-feature-layer/m-p/74805#M1817</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-11-12T14:46:45Z</dc:date>
    </item>
  </channel>
</rss>

