<?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 Removing selection mode will stay for one more selection in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180217#M779</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 toolbar item that sets selection mode to Rectangle, and another toolbar item that clears the current selection. When it clears the current selection, I want it to stop allowing me to select, until I press the former toolbar item again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I have this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
private void selectTool_Click(object sender, RoutedEventArgs e)
{
 if (MapEditor.Select.CanExecute("Keyboard"))
 {
&amp;nbsp; MapEditor.SelectionMode = DrawMode.Rectangle;
&amp;nbsp; //MapEditor.Select.Execute("Keyboard");
 }
}

private void unselectTool_Click(object sender, RoutedEventArgs e)
{
 if (MapEditor.ClearSelection.CanExecute(null))
 {
&amp;nbsp; MapEditor.ClearSelection.Execute(null);
&amp;nbsp; //MapEditor.SelectionMode = DrawMode.None;
 }
 if (MapEditor.CancelActive.CanExecute(null))
 {
&amp;nbsp; MapEditor.CancelActive.Execute(null);
 }
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The unselect tool correctly unselects everything, but still allows me to use my mouse to select one more time. When I release the mouse click, I am now in pan-mode. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2013 20:44:38 GMT</pubDate>
    <dc:creator>GeorgeFaraj</dc:creator>
    <dc:date>2013-03-15T20:44:38Z</dc:date>
    <item>
      <title>Removing selection mode will stay for one more selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180217#M779</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 toolbar item that sets selection mode to Rectangle, and another toolbar item that clears the current selection. When it clears the current selection, I want it to stop allowing me to select, until I press the former toolbar item again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I have this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
private void selectTool_Click(object sender, RoutedEventArgs e)
{
 if (MapEditor.Select.CanExecute("Keyboard"))
 {
&amp;nbsp; MapEditor.SelectionMode = DrawMode.Rectangle;
&amp;nbsp; //MapEditor.Select.Execute("Keyboard");
 }
}

private void unselectTool_Click(object sender, RoutedEventArgs e)
{
 if (MapEditor.ClearSelection.CanExecute(null))
 {
&amp;nbsp; MapEditor.ClearSelection.Execute(null);
&amp;nbsp; //MapEditor.SelectionMode = DrawMode.None;
 }
 if (MapEditor.CancelActive.CanExecute(null))
 {
&amp;nbsp; MapEditor.CancelActive.Execute(null);
 }
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The unselect tool correctly unselects everything, but still allows me to use my mouse to select one more time. When I release the mouse click, I am now in pan-mode. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 20:44:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180217#M779</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-03-15T20:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selection mode will stay for one more selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180218#M780</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;You could use try using Button Command and CommandParameter properties. Once the selection has been removed you can not select again until you click the SelectTool button. This is also demonstrated in the Selecting a FeatureLayer sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Selecting_a_FeatureLayer/02q200000066000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Selecting_a_FeatureLayer/02q200000066000000/&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is a code snippet of the ToolBar Buttons with the CommandParameter and Command set in .xaml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
&amp;lt;ToolBarTray Margin="0,0,0,267" DataContext="{StaticResource MyEditor}"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ToolBar&amp;gt;
&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;&amp;nbsp;&amp;nbsp; &amp;lt;Button Content="SelectTool" Foreground="Black" CommandParameter="Add" Command="{Binding Select}" /&amp;gt;
&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;&amp;nbsp;&amp;nbsp; &amp;lt;Button Content="UnSelectTool" Foreground="Black" CommandParameter="Remove" Command="{Binding Select}" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ToolBar&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ToolBarTray&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kerrie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180218#M780</guid>
      <dc:creator>KerrieScholefield</dc:creator>
      <dc:date>2021-12-11T09:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selection mode will stay for one more selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180219#M781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I encounter the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I activate the Select command using code like CCPoston does.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Button sample provided does not help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why doesn't the CancelActive command work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to cancel the Selection command once invoked?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 15:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180219#M781</guid>
      <dc:creator>teamIgal</dc:creator>
      <dc:date>2013-03-20T15:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selection mode will stay for one more selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180220#M782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You could use try using Button Command and CommandParameter properties. Once the selection has been removed you can not select again until you click the SelectTool button. This is also demonstrated in the Selecting a FeatureLayer sample.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Selecting_a_FeatureLayer/02q200000066000000/"&gt;http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Selecting_a_FeatureLayer/02q200000066000000/&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Kerrie&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Kerrie,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm actually using the commands in my toolbar items already. I'm not saying that the button is left enabled, I'm saying that when I click the map after canceling the selection, instead of panning, it allows me to select one more time. After that one time, when I click the map, I'm in pan mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 19:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180220#M782</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2013-03-20T19:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selection mode will stay for one more selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180221#M783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there any solution to this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 11:50:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/180221#M783</guid>
      <dc:creator>teamIgal</dc:creator>
      <dc:date>2013-04-02T11:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selection mode will stay for one more selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/1613294#M3850</link>
      <description>&lt;P&gt;&amp;nbsp;I am running into this problem today.&amp;nbsp; I select in the table and then select using the tool on the map and it unselects my feature.&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 16:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/removing-selection-mode-will-stay-for-one-more/m-p/1613294#M3850</guid>
      <dc:creator>JoanRickard</dc:creator>
      <dc:date>2025-05-09T16:04:28Z</dc:date>
    </item>
  </channel>
</rss>

