<?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 FeatureLayer SelectionColor has no effect in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746762#M19083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Setting the selection color initially works for me too, but if I add a button to your example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;Button Content="Change Selection Color" VerticalAlignment="Top" Click="Button_Click" /&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with the following code-behind:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private void Button_Click(object sender, RoutedEventArgs e)
{
 FeatureLayer layer = MyMap.Layers["MyLayer"] as FeatureLayer;
 var brush = new SolidColorBrush(Colors.Magenta);
 layer.SelectionColor = brush;
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;clicking the button will not change the selection color of a currently or subsequently selected feature as I expected it should. Am I missing something?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:45:38 GMT</pubDate>
    <dc:creator>MarkusHjärne</dc:creator>
    <dc:date>2021-12-12T07:45:38Z</dc:date>
    <item>
      <title>Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746760#M19081</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;I have a FeatureLayer pointing to a feature service with an unique value renderer. When trying to change the SelectionColor after the layer has been initailized, the value gets set, but the selection color in the map isn't changed. Shouldn't that be possible? I'm using version 2.0 of the API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Markus Hjarne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 13:48:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746760#M19081</guid>
      <dc:creator>MarkusHjärne</dc:creator>
      <dc:date>2011-03-14T13:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746761#M19082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried the following code and was not able to replicate the issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This feature service also defines its own UniqueValueRenderer. I am using Editor.Select for to select the features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;
 &amp;lt;Grid.Resources&amp;gt;
&amp;nbsp; &amp;lt;esri:Editor x:Key="MyEditor" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Map="{Binding ElementName=MyMap}" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectionMode="Rectangle"/&amp;gt;
 &amp;lt;/Grid.Resources&amp;gt;
 &amp;lt;esri:Map x:Name="MyMap" Background="White"&amp;gt;
&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer&amp;nbsp; Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /&amp;gt;
&amp;nbsp; &amp;lt;esri:FeatureLayer ID="MyLayer" SelectionColor="Yellow" Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0"/&amp;gt;
 &amp;lt;/esri:Map&amp;gt;
 &amp;lt;Button Content="Select" Command="{Binding Select}" CommandParameter="new" 
 DataContext="{StaticResource MyEditor}" VerticalAlignment="Top" HorizontalAlignment="Center"/&amp;gt;
&amp;lt;/Grid&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:45:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746761#M19082</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-12T07:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746762#M19083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Setting the selection color initially works for me too, but if I add a button to your example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;Button Content="Change Selection Color" VerticalAlignment="Top" Click="Button_Click" /&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with the following code-behind:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private void Button_Click(object sender, RoutedEventArgs e)
{
 FeatureLayer layer = MyMap.Layers["MyLayer"] as FeatureLayer;
 var brush = new SolidColorBrush(Colors.Magenta);
 layer.SelectionColor = brush;
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;clicking the button will not change the selection color of a currently or subsequently selected feature as I expected it should. Am I missing something?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746762#M19083</guid>
      <dc:creator>MarkusHjärne</dc:creator>
      <dc:date>2021-12-12T07:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746763#M19084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh I see, symbols defined by the service does not update their selection color. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for reporting this. We'll try to get it fixed in future release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 20:41:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746763#M19084</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-03-15T20:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746764#M19085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. Can you think of any workaround for doing this in the meantime?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I actually want to do is set the selection color to Transparent to kind of hide the selection in the map temporarily. I cannot just save the selection somewhere else and deselect everything, because I also has a FeatureDataGrid where I still want the selection to be visible.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 06:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746764#M19085</guid>
      <dc:creator>MarkusHjärne</dc:creator>
      <dc:date>2011-03-16T06:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746765#M19086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want SelectionColor to be ignored, you can define your own renderer so that it will not use the renderer defined by the service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~SelectionColor.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~SelectionColor.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 16:12:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746765#M19086</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-03-16T16:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746766#M19087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the tip.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the picture marker symbols in the feature service's unique value renderer might be changed in the future, I want to base my own renderer on the symbol images from the feature service's symbols. But since the picture marker symbol class of the feature service's renderer is internal, I don't know how to get to those images. Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 21:39:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746766#M19087</guid>
      <dc:creator>MarkusHjärne</dc:creator>
      <dc:date>2011-03-17T21:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746767#M19088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are right, FeatureService.Symbols are internal and you will not have access to the image URL or image data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can parse the json by appending "?f=json" to the layer URL ("?f=pjson" for pretty json).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example: &lt;/SPAN&gt;&lt;A href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0?f=pjson"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0?f=pjson&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If image URL is provided, you can append "/images/[image URL]" tothe layer URL to get the image. For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0/images/4A138C60"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0/images/4A138C60&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;If image data is provided, you can Convert this Base64String to byte[], set BitmapImage Source to MemoryStream of this byte[], set Image.Source to this BitmapImage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is best described in REST documentation for Picture Marker Symbols: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/symbol.html#pms"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/symbol.html#pms&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This link provides example on how you can read/parse JSON: &lt;/SPAN&gt;&lt;A href="http://forums.silverlight.net/forums/p/169016/380845.aspx"&gt;http://forums.silverlight.net/forums/p/169016/380845.aspx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 00:55:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746767#M19088</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-03-18T00:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746768#M19089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, but no thanks. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If only ESRI.ArcGIS.Client.FeatureService.Symbols.PictureMarkerSymbol had inherited from ESRI.ArcGIS.Client.Symbols.PictureMarkerSymbol, it had been so much easier (the same holds for most of the other feature service symbols). Do you have any plans to change this in a future release (it should be a non-breaking change)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, at least now I know how to do it if it gets absolutely necessary.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 06:24:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746768#M19089</guid>
      <dc:creator>MarkusHjärne</dc:creator>
      <dc:date>2011-03-18T06:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746769#M19090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I checked with our dev lead and Morten said an alternative solution that will allow you to set SelectionColor on the fly is to recreate the layer (it should be fast because the requests will be cached by the browser).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This way you don't have to change the renderer defined by your service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 17:13:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746769#M19090</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-03-18T17:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Changing FeatureLayer SelectionColor has no effect</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746770#M19091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks again for your help. But recreating the layer might work in isolation, but in a real-world application where references to the layer have been passed around and event handlers have been wired to it in different places, it is not that easy to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created a new renderer without selection color and it works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 14:19:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/changing-featurelayer-selectioncolor-has-no-effect/m-p/746770#M19091</guid>
      <dc:creator>MarkusHjärne</dc:creator>
      <dc:date>2011-03-21T14:19:26Z</dc:date>
    </item>
  </channel>
</rss>

