Constrains the gesture so the resulting scaled and translated item will remain visible. Unlike ConstrainElement this works only with items exposing an ISizeConstraint, such as Image, but provides stricter bounds calculations (based on the actual visual content, not just the element bounds).

Example

The zoomed image cannot be panned outside the extents of the control.

<Panel HitTestMode="LocalBounds" Width="400" Height="400" Color="#aaa" ClipToBounds="true">
    <Image File="../../Assets/large_troll.jpg" ux:Name="TheImage">
        <InteractiveTransform ux:Name="ImageTrans"/>
    </Image>
    <ZoomGesture Target="ImageTrans"/>
    <PanGesture Target="ImageTrans" Constraint="TheImage"/>
</Panel>

Location

Namespace
Fuse.Gestures
Package
Fuse.Gestures 1.9.0

Returns

ISizeConstraint