This is a migrated thread and some comments may be shown as answers.

PanAndZoomImage Size when zoom

1 Answer 68 Views
PanAndZoomImage
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Damiano
Top achievements
Rank 1
Damiano asked on 06 Apr 2013, 01:56 PM
Hi,
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"
                                           />
            </StackPanel>

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.

Thanks



1 Answer, 1 is accepted

Sort by
0
Accepted
Victor
Telerik team
answered on 10 Apr 2013, 07:38 AM
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.

Greetings,
Victor
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.
Tags
PanAndZoomImage
Asked by
Damiano
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or