<?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: How to reference the selected graphic in Edit mode? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-reference-the-selected-graphic-in-edit-mode/m-p/500391#M12815</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the service used in your FeatureLayer defines its own renderer, you can set FeatureLayer.SelectionColor when you define the layer.&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~SelectionColor.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~SelectionColor.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get the symbol color, you have the following options (see comments).&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void FeatureLayer_Initialized(object sender, System.EventArgs e)
{
 FeatureLayer layer = sender as FeatureLayer;
 if (layer == null || layer.Renderer == null) return;
 Symbol symbol = null;
 Brush brush = null;
 //Determine type of Renderer to get symbol
 if (layer.Renderer is SimpleRenderer)
&amp;nbsp; symbol = (layer.Renderer as SimpleRenderer).Symbol;
 //or, pass graphic to layer.Renderer.GetSymbol()
 if (layer.Graphics != null &amp;amp;&amp;amp; layer.Graphics.Count &amp;gt; 0)
&amp;nbsp; symbol = layer.Renderer.GetSymbol(layer.Graphics[0]);
 //if not FeatureService.Symbols, you can do...
 if (symbol is SimpleMarkerSymbol)
&amp;nbsp; brush = (symbol as SimpleMarkerSymbol).Color;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:58:31 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2021-12-11T21:58:31Z</dc:date>
    <item>
      <title>How to reference the selected graphic in Edit mode?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-reference-the-selected-graphic-in-edit-mode/m-p/500390#M12814</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;Under edit mode by using Editor, when I select a feature, the feature is highlighted with Cyan color. Is there any way that I can change this default highlighted fill color and the border color?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have another question about the legend. In my code, how could I get the color or the symbology for a certain layer from a map service? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wei&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 20:36:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-reference-the-selected-graphic-in-edit-mode/m-p/500390#M12814</guid>
      <dc:creator>weiliang</dc:creator>
      <dc:date>2011-03-21T20:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference the selected graphic in Edit mode?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-reference-the-selected-graphic-in-edit-mode/m-p/500391#M12815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the service used in your FeatureLayer defines its own renderer, you can set FeatureLayer.SelectionColor when you define the layer.&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~SelectionColor.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~SelectionColor.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get the symbol color, you have the following options (see comments).&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void FeatureLayer_Initialized(object sender, System.EventArgs e)
{
 FeatureLayer layer = sender as FeatureLayer;
 if (layer == null || layer.Renderer == null) return;
 Symbol symbol = null;
 Brush brush = null;
 //Determine type of Renderer to get symbol
 if (layer.Renderer is SimpleRenderer)
&amp;nbsp; symbol = (layer.Renderer as SimpleRenderer).Symbol;
 //or, pass graphic to layer.Renderer.GetSymbol()
 if (layer.Graphics != null &amp;amp;&amp;amp; layer.Graphics.Count &amp;gt; 0)
&amp;nbsp; symbol = layer.Renderer.GetSymbol(layer.Graphics[0]);
 //if not FeatureService.Symbols, you can do...
 if (symbol is SimpleMarkerSymbol)
&amp;nbsp; brush = (symbol as SimpleMarkerSymbol).Color;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:58:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-reference-the-selected-graphic-in-edit-mode/m-p/500391#M12815</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T21:58:31Z</dc:date>
    </item>
  </channel>
</rss>

