<?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: Can I prevent a map tool from deactivating using OnToolDeactivateAsync or OnActiveToolChanged? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-i-prevent-a-map-tool-from-deactivating-using/m-p/1310146#M10059</link>
    <description>&lt;P&gt;Essentially, we want our custom map tool to be the default tool. Unless the user specifically activates another tool we want our map tool to be on. As far as zooming and panning the user is still able to zoom with the mouse scroll and pan by holding c + click and drag. Identify and select is unused though in our tool at this time.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 17:27:24 GMT</pubDate>
    <dc:creator>JustinLovato</dc:creator>
    <dc:date>2023-07-20T17:27:24Z</dc:date>
    <item>
      <title>Can I prevent a map tool from deactivating using OnToolDeactivateAsync or OnActiveToolChanged?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-i-prevent-a-map-tool-from-deactivating-using/m-p/1307460#M10028</link>
      <description>&lt;P&gt;I have a MapTool that I don't want the user to be able to exit out of. I am trying to use the &lt;EM&gt;OnToolDeactivateAsync&lt;/EM&gt; Task and/or the &lt;EM&gt;OnActiveToolChanged&lt;/EM&gt; event to 'reactivate' the tool as soon as the user presses the escape key.&lt;BR /&gt;&lt;BR /&gt;protected override Task OnToolDeactiveAsync(bool hasMapViewChanged)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if (FrameworkApplication.OutgoingTool == "Map_Tool")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FrameworkApplication.SetCurrentToolAsync("Map_Tool");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return base.OnToolDeactivateAsync(hasMapViewChanged);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;After this executes my MapTool is shown as active on the map, but is bugged in functionality - it works similar to that of the Explore Tool. I'm not sure why this is. Is there a way to achieve a re-activation of a MapTool upon its deactivation through this method or other?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 23:13:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-i-prevent-a-map-tool-from-deactivating-using/m-p/1307460#M10028</guid>
      <dc:creator>JustinLovato</dc:creator>
      <dc:date>2023-07-11T23:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can I prevent a map tool from deactivating using OnToolDeactivateAsync or OnActiveToolChanged?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-i-prevent-a-map-tool-from-deactivating-using/m-p/1309758#M10057</link>
      <description>&lt;P&gt;I see this behavior also. I will post back if I have any updates on this.&lt;/P&gt;&lt;P&gt;Just curious about the workflow you are trying to achieve with the custom tool -&amp;nbsp;How will you zoom, pan, identify, select?&amp;nbsp;&amp;nbsp;&amp;nbsp; Will your tool handle all the actions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 20:30:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-i-prevent-a-map-tool-from-deactivating-using/m-p/1309758#M10057</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2023-07-19T20:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can I prevent a map tool from deactivating using OnToolDeactivateAsync or OnActiveToolChanged?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-i-prevent-a-map-tool-from-deactivating-using/m-p/1310146#M10059</link>
      <description>&lt;P&gt;Essentially, we want our custom map tool to be the default tool. Unless the user specifically activates another tool we want our map tool to be on. As far as zooming and panning the user is still able to zoom with the mouse scroll and pan by holding c + click and drag. Identify and select is unused though in our tool at this time.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 17:27:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-i-prevent-a-map-tool-from-deactivating-using/m-p/1310146#M10059</guid>
      <dc:creator>JustinLovato</dc:creator>
      <dc:date>2023-07-20T17:27:24Z</dc:date>
    </item>
  </channel>
</rss>

