<?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 AdvancedSymbology Message value reverts back to default in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/advancedsymbology-message-value-reverts-back-to/m-p/227669#M1037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am adding a custom designation to the AdvancedSymbology Message to keep track when a message is Selected. It appears that the value I set on the message reverts back to the original value when I pull that message out of the message layer. Here is the sudo code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Create a new message and add the custom designation:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.Add("IsSelected", "false");

Pull the message from the message layer, set the custom designation to true and process the message:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedMessage = messageLayer.GetMessage(message.Id);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedMessage["IsSelected"] = "true";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; messageLayer.ProcessMessage(selectedMessage);

Check the value of the custom designation:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selectedMessage["IsSelected"] == "true")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the last step the value is always the default value (in this case false). Is there a better way to know when a message is selected or not?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 May 2013 13:20:43 GMT</pubDate>
    <dc:creator>MatthewSerbinski</dc:creator>
    <dc:date>2013-05-17T13:20:43Z</dc:date>
    <item>
      <title>AdvancedSymbology Message value reverts back to default</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/advancedsymbology-message-value-reverts-back-to/m-p/227669#M1037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am adding a custom designation to the AdvancedSymbology Message to keep track when a message is Selected. It appears that the value I set on the message reverts back to the original value when I pull that message out of the message layer. Here is the sudo code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Create a new message and add the custom designation:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.Add("IsSelected", "false");

Pull the message from the message layer, set the custom designation to true and process the message:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedMessage = messageLayer.GetMessage(message.Id);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedMessage["IsSelected"] = "true";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; messageLayer.ProcessMessage(selectedMessage);

Check the value of the custom designation:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (selectedMessage["IsSelected"] == "true")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the last step the value is always the default value (in this case false). Is there a better way to know when a message is selected or not?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 13:20:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/advancedsymbology-message-value-reverts-back-to/m-p/227669#M1037</guid>
      <dc:creator>MatthewSerbinski</dc:creator>
      <dc:date>2013-05-17T13:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: AdvancedSymbology Message value reverts back to default</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/advancedsymbology-message-value-reverts-back-to/m-p/227670#M1038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I still do not know why the value on the message is not taking when it is set and processed, but I have figured out that you can use the following code to know when a message is selected or not:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;bool isSelected = messageLayer.&lt;STRONG&gt;GetMessageIsSelected&lt;/STRONG&gt;(selectMessage.Id);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 23:46:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/advancedsymbology-message-value-reverts-back-to/m-p/227670#M1038</guid>
      <dc:creator>MatthewSerbinski</dc:creator>
      <dc:date>2013-05-17T23:46:25Z</dc:date>
    </item>
  </channel>
</rss>

