Windows phone 7 + canvas + gesture + OnDrag events + pan / drag restriction

I have one container canvas inside which I load a large canvas. I use gesture listening methods. Several methods, such as OnDragStarted, OnDragDelta and OnDragCompleted, I use these methods to pan the inner (larger) canvas.

The problem is that I cannot limit the panning of the inner canvas, which means that I must be able to pan the inner canvas within the border of the outer canvas.

How can I do that?

+3
source share
2 answers

, , .

. , /?

, , GestureListener GestureReceiver.

, x, y, , .

0

, . , , , Canvas : hidden. , , .

:

<Canvas Width="200" Height="100">       
    <Canvas.Clip>
        <RectangleGeometry Rect="0, 0, 200, 100"/>
    </Canvas.Clip>
</Canvas>
0

All Articles