Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Handle Manipulation Events for Controls in a ScrollViewer

$
0
0

Hi Guys

I have the following part in the XAML. The WrapPanel holds images during runtime which should be draggable over the surrounding Grid: 

<controls:TwoFingerScrollViewer x:Name="ScollPane" PanningMode="VerticalOnly" VerticalScrollBarVisibility="Hidden"><WrapPanel x:Name="SmallImagePreviewPanel"></WrapPanel></controls:TwoFingerScrollViewer>
The 'TwoFingerScrollViewer' just overrides the OnManipulationDelta of the ScrollViewer where it checks whether there are more than one touch-device scrolling or not. When there is just one touch-device the event is not handled. 

To handle all the ManipulationEvents for the controls within the ScrollViewer I used the addHandler method which works more or less with the normal ScrollViewer. Anyway somehow the ManipulationCompletedEvent is never fired when using only one touch-device (with the TwoFingerScrollViewer). 

Is there a dependency between the ManipulationDelta and ManipulationCompleted events (so that it wouldn't be possible to not handle the ManipulationDelta when using just one touch-device). Or what am I missing? 

Thanks for your help! 


 


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>