<?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 set default mouse to zoom rather than pan in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/set-default-mouse-to-zoom-rather-than-pan/m-p/632219#M7775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the procedure in the .NET runtime to set the default mouse drag to zoom rather than pan. This is done in the Java API with ZoomOverlay but I can't seen to find a way to switch in the .NET runtime. I want to attach the code to a button on the UI so that the user doesn't have to hold down the shift key to create the drag-zoom window.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Sep 2015 23:12:17 GMT</pubDate>
    <dc:creator>JerrySchultz</dc:creator>
    <dc:date>2015-09-18T23:12:17Z</dc:date>
    <item>
      <title>set default mouse to zoom rather than pan</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/set-default-mouse-to-zoom-rather-than-pan/m-p/632219#M7775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the procedure in the .NET runtime to set the default mouse drag to zoom rather than pan. This is done in the Java API with ZoomOverlay but I can't seen to find a way to switch in the .NET runtime. I want to attach the code to a button on the UI so that the user doesn't have to hold down the shift key to create the drag-zoom window.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 23:12:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/set-default-mouse-to-zoom-rather-than-pan/m-p/632219#M7775</guid>
      <dc:creator>JerrySchultz</dc:creator>
      <dc:date>2015-09-18T23:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: set default mouse to zoom rather than pan</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/set-default-mouse-to-zoom-rather-than-pan/m-p/632220#M7776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; So the workflow to do that is to allow user to drag a rectangle and then zoom to it. You can achieve this by invoking a button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C# code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private async void ZoomToEnvelopeButton_Click(object sender, RoutedEventArgs e)
&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;nbsp;&amp;nbsp;&amp;nbsp; // use the MapView's Editor to request geometry (Envelope) from the user and await the result
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var newExtent = await MyMapView.Editor.RequestShapeAsync(Esri.ArcGISRuntime.Controls.DrawShape.Rectangle);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set the map view extent with the Envelope
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; await MyMapView.SetViewAsync(newExtent);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XAML code&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&amp;lt;Button x:Name="ZoomToEnvelopeButton" Content="Set Extent" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="100" Width="125" Click="ZoomToEnvelopeButton_Click"&amp;gt;&amp;lt;/Button&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:54:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/set-default-mouse-to-zoom-rather-than-pan/m-p/632220#M7776</guid>
      <dc:creator>nakulmanocha</dc:creator>
      <dc:date>2021-12-12T02:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: set default mouse to zoom rather than pan</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/set-default-mouse-to-zoom-rather-than-pan/m-p/632221#M7777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The c# code was just what I was looking for. Works great. Many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 05:06:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/set-default-mouse-to-zoom-rather-than-pan/m-p/632221#M7777</guid>
      <dc:creator>JerrySchultz</dc:creator>
      <dc:date>2015-09-22T05:06:08Z</dc:date>
    </item>
  </channel>
</rss>

