I got a Canvas inside ScrollViewer.
<ScrollViewer x:Name="svWorkSpace" Visibility="Collapsed" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
Tapped="svWorkSpace_Tapped"
PointerPressed="svWorkSpace_PointerPressed"
PointerMoved="svWorkSpace_PointerMoved"
PointerReleased="svWorkSpace_PointerReleased">
<Grid>
<Image x:Name="cvWorkImage"/>
<Canvas x:Name="cvWorkSpace"/>
</Grid>
</ScrollViewer>
In PointerPressed code, I capture the starting point and in PointerMoved code, I draw a rectangle as pointer moves (also remove trailing rectangle a I move, maintaining only a single rectangle in the canvas. I achieve rectangle sizing effect using this method). PointerReleased will accept the last rectangle.
Everything works fine using a mouse in touch enabled device but not using finger. The image just scroll when I move my finger.
Tried to move the code into Canvas, like below. Failed to draw rectangle using both mouse and touch.
<ScrollViewer x:Name="svWorkSpace" Visibility="Collapsed" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Grid>
<Image x:Name="cvWorkImage"/>
<Canvas x:Name="cvWorkSpace"
Tapped="svWorkSpace_Tapped"
PointerPressed="svWorkSpace_PointerPressed"
PointerMoved="svWorkSpace_PointerMoved"
PointerReleased="svWorkSpace_PointerReleased"/>
</Grid>
</ScrollViewer>
Point me in the right direction pls.