Article From:
WPF: multi touch zoom in and out.

Copyright notice: This article is an original article for bloggers, which needs to be reprinted, though reproduced. Https://

If you want to narrow down a canvas, or picture:

<Canvas x:Name="picShow" ClipToBounds="True" Canvas.Left="0" Canvas.Top="0" Height="509" Width="720">
            <ei:TranslateZoomRotateBehavior x:Name="eiPic" TranslateFriction="0.1" RotationalFriction="0.1"/>
        <Image x:Name="image1" Height="410" Canvas.Left="45" Source="" Canvas.Top="42" Width="629"/>

Just add & lt; i: Interaction. Behaviors & gt; lt; ei: TranslateZoom Rotate Behavior /& gt; lt; / i: Interaction.Behaviors> you can stretch and change controls.

If you add this behavior in canvas, you can stretch all controls in canvas.

TranslateFrictionIt’s mobile friction. RotationalFriction is a rotating friction force.

eiPic.SupportedGestures = ManipulationModes.None;  //Control whether mobile

ManipulationModesIt also controls the movement direction and single direction movement of the control.

Link of this Article: WPF multi touch zoom in and down

Leave a Reply

Your email address will not be published. Required fields are marked *