<?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 Stylus.IsPressAndHoldEnabled does not generate Right-Click on MapView. in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/stylus-ispressandholdenabled-does-not-generate/m-p/1097502#M3825</link>
    <description>&lt;P&gt;Ladies and Gentlemen,&lt;BR /&gt;I am looking for a solution to the following scenario regarding Touch Gestures on a Map View to generate a "Right-Click" mouse event...&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;ArcGISRuntime100.5 to create a User Control in WPF. This control has been under development for a couple of years now but was initially designed to only use mouse input instead of touch gestures. I am now attempting to implement said gestures but am having a problem getting a "Touch and Hold" gesture to generate a "Right-Click". The MapView already has built-in functionality for a "Right-Click" mouse event which is mapped to the OnContextMenuOpening event. However, setting the&amp;nbsp;Stylus.IsPressAndHoldEnabled property to True, within code or in the MapView UI XAML, always results in a "Magnifying Glass" being displayed on "Touch and Hold" and never generates a "Right-Click" to open the Context Menu. I am assumming this "Magnifying Glass" functionality is also built into the MapView, but I cannot seem to override it using the suggested Stylus methods.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;XAML:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&amp;lt;esri:MapView x:Name="ArcGISMapView" Map="{Binding Map}" Grid.Row="0" Grid.Column="{Binding ToggleColumn}" Grid.ColumnSpan="2" ContextMenu="{StaticResource MapContextMenu}"&lt;BR /&gt;Panel.ZIndex="0" &lt;STRONG&gt;Stylus.IsPressAndHoldEnabled="True"&lt;/STRONG&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;// Testing Touch Events...&lt;BR /&gt;// Trying to get Touch and Hold to generate Right-Click so Context menu will appear!!&lt;BR /&gt;m_MapView.TouchDown += new EventHandler&amp;lt;TouchEventArgs&amp;gt;(HandleTouchDown);&lt;BR /&gt;m_MapView.TouchUp += new EventHandler&amp;lt;TouchEventArgs&amp;gt;(HandleTouchup);&lt;BR /&gt;&lt;STRONG&gt;Stylus.SetIsPressAndHoldEnabled(this.m_MapView, true);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I would be very grateful for any assistance!!&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;SPAN&gt;GBCodeByter&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Sep 2021 03:22:22 GMT</pubDate>
    <dc:creator>GBCodeByter</dc:creator>
    <dc:date>2021-09-13T03:22:22Z</dc:date>
    <item>
      <title>Stylus.IsPressAndHoldEnabled does not generate Right-Click on MapView.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/stylus-ispressandholdenabled-does-not-generate/m-p/1097502#M3825</link>
      <description>&lt;P&gt;Ladies and Gentlemen,&lt;BR /&gt;I am looking for a solution to the following scenario regarding Touch Gestures on a Map View to generate a "Right-Click" mouse event...&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;ArcGISRuntime100.5 to create a User Control in WPF. This control has been under development for a couple of years now but was initially designed to only use mouse input instead of touch gestures. I am now attempting to implement said gestures but am having a problem getting a "Touch and Hold" gesture to generate a "Right-Click". The MapView already has built-in functionality for a "Right-Click" mouse event which is mapped to the OnContextMenuOpening event. However, setting the&amp;nbsp;Stylus.IsPressAndHoldEnabled property to True, within code or in the MapView UI XAML, always results in a "Magnifying Glass" being displayed on "Touch and Hold" and never generates a "Right-Click" to open the Context Menu. I am assumming this "Magnifying Glass" functionality is also built into the MapView, but I cannot seem to override it using the suggested Stylus methods.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;XAML:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&amp;lt;esri:MapView x:Name="ArcGISMapView" Map="{Binding Map}" Grid.Row="0" Grid.Column="{Binding ToggleColumn}" Grid.ColumnSpan="2" ContextMenu="{StaticResource MapContextMenu}"&lt;BR /&gt;Panel.ZIndex="0" &lt;STRONG&gt;Stylus.IsPressAndHoldEnabled="True"&lt;/STRONG&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;// Testing Touch Events...&lt;BR /&gt;// Trying to get Touch and Hold to generate Right-Click so Context menu will appear!!&lt;BR /&gt;m_MapView.TouchDown += new EventHandler&amp;lt;TouchEventArgs&amp;gt;(HandleTouchDown);&lt;BR /&gt;m_MapView.TouchUp += new EventHandler&amp;lt;TouchEventArgs&amp;gt;(HandleTouchup);&lt;BR /&gt;&lt;STRONG&gt;Stylus.SetIsPressAndHoldEnabled(this.m_MapView, true);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I would be very grateful for any assistance!!&lt;BR /&gt;Thank you,&lt;BR /&gt;&lt;SPAN&gt;GBCodeByter&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 03:22:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/stylus-ispressandholdenabled-does-not-generate/m-p/1097502#M3825</guid>
      <dc:creator>GBCodeByter</dc:creator>
      <dc:date>2021-09-13T03:22:22Z</dc:date>
    </item>
  </channel>
</rss>

