PanAndZoomImage Size when zoom

Thread is closed for posting
2 posts, 1 answers
  1. Damiano
    Damiano avatar
    1 posts
    Member since:
    Feb 2013

    Posted 06 Apr 2013 Link to this post

    this is the xaml of my project

    <StackPanel Margin="0,0,0,-2" Orientation="Vertical">
                    <slideView:PanAndZoomImage x:Name="mImage"
                        MaximumZoom="10" Height="286" ZoomMode="Free" Width="456"
                    <slideView:PanAndZoomImage x:Name="mImage_Copy"
                        MaximumZoom="10" Height="286" Source="{Binding Source, ElementName=mImage}" Zoom="{Binding Zoom, ElementName=mImage, Mode=TwoWay}" Pan="{Binding Pan, ElementName=mImage, Mode=TwoWay}" ZoomMode="Free" Width="456"

    My purpose is to implement a sort of image compare.
    I bind Zoom and Pan property (source is bind only for test) of mImage_Copy to mImage.
    When I zoom or move first image the second one zoom and move in the same way.

    It works.

    My problem is that when i zoom, the image size exceed its container size and mImage_Copy surmounts mImage.
    Is it possible zoom an image without exceed its container size?

    I hope I was clear enough.


  2. Answer
    Victor avatar
    1358 posts

    Posted 10 Apr 2013 Link to this post

    Hello Damiano,

    You have to set the Clip property of your PanAndZoomImage objects to a RectangleGeometry object that has the same dimensions as the controls themselves. 456 * 286 in your case.

    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top