View Issue Details

IDProjectCategoryView StatusLast Update
0002024NoesisGUIC++ SDKpublic2021-05-19 13:46
Reportersfernandez Assigned To 
PrioritynormalSeverityminor 
Status newResolutionopen 
Product Version3.0.12 
Summary0002024: WPF differences on how Touch and Manipulation events are sent
Description

With the following xaml:

<Window x:Class="Touch.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="LayoutRoot" Background="Silver" IsManipulationEnabled="True">
<Rectangle x:Name="rect" Width="200" Height="100" Fill="Red"/>
</Grid>
</Window>

Touching the rectangle generates the following events in WPF and Noesis:

WPF
======================================
MainWindow.TouchDown Rectangle(rect)
MainWindow.GotTouchCapture Rectangle(rect) : Captured=Rectangle(rect)
MainWindow.LostTouchCapture Rectangle(rect) : Captured=Grid(LayoutRoot)
MainWindow.GotTouchCapture Grid(LayoutRoot) : Captured=Grid(LayoutRoot)
LayoutRoot.ManipulationStarting Grid(LayoutRoot)
LayoutRoot.ManipulationStarted Grid(LayoutRoot)

MainWindow.TouchUp Grid(LayoutRoot)
MainWindow.LostTouchCapture Grid(LayoutRoot) : Captured=null
LayoutRoot.ManipulationInertiaStarting Grid(LayoutRoot)
LayoutRoot.ManipulationCompleted Grid(LayoutRoot)

NOESIS
======================================
MainWindow.TouchDown Rectangle(rect)
MainWindow.GotTouchCapture Rectangle(rect) : Captured=Rectangle(rect)
LayoutRoot.ManipulationStarting Grid(LayoutRoot)
LayoutRoot.ManipulationStarted Grid(LayoutRoot)
MainWindow.LostTouchCapture Rectangle(rect) : Captured=Grid(LayoutRoot)
MainWindow.GotTouchCapture Grid(LayoutRoot) : Captured=Grid(LayoutRoot)

LayoutRoot.ManipulationInertiaStarting Grid
MainWindow.LostTouchCapture Grid : Captured=null
LayoutRoot.ManipulationCompleted Grid

There are two important differences here:

  1. On touch down, when manipulation starts, in WPF first the source captures the touch, then it raises ManipulationStarting and ManipulationStarted events. In Noesis capture happens after manipulation start events.
  2. On touch up, in WPF the TouchUp event is raised before terminating the manipulation. In Noesis TouchUp event is not fired if a manipulation is active.

Another difference is that WPF doesn't send MouseMove events when ManipulationInertiaStarting or ManipulationCompleted events are cancelled. Noesis is sending MouseMove(x,y) before promoting the MouseUp and MouseMove(-1,-1) after. So in WPF the control's "MouseOver" state will keep visible after cancelling the manipulations, but not in Noesis. Although I don't really like how WPF behaves in this situation, because leaves the UI in an incorrect visual state.

PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-05-19 12:55 sfernandez New Issue
2021-05-19 12:56 sfernandez Description Updated
2021-05-19 13:46 sfernandez Description Updated