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

How to know that Scale is started

1 Answer 74 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.
Vladimir
Top achievements
Rank 1
Vladimir asked on 28 Jan 2013, 08:01 AM
     Hello. I have a PanAndZoomImage  to show an Image with Scale ability. When Scale is started I need to show MessageBox where User could choose Image Size(Image quality), after that I would  change the Image source to another for scaling. Could You help me how I could do it? how can I know that scaling is started.

                            <slideView:PanAndZoomImage x:Name="panAndZoomImage"
                                                   ZoomMode="Free"
                                                   MaximumZoom="4,4"
                                                   Source="{Binding FullCover}"                                                       
                                                     >                     
                                    <slideView:PanAndZoomImage.RenderTransform>
                                        <CompositeTransform x:Name="transformFront" ScaleX="1" ScaleY="1"  />
                                    </slideView:PanAndZoomImage.RenderTransform>
                                    <slideView:PanAndZoomImage.Projection>
                                        <PlaneProjection/>
                                    </slideView:PanAndZoomImage.Projection>
                                </slideView:PanAndZoomImage>
                                   

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 30 Jan 2013, 10:01 AM
Hello Vladimir,

You can inherit from PanAndZoomImage and override the OnZoomChanged method. It's a callback that is called whenever the Zoom property changes and it does so when the user pinches or sets it through code.

You can also take a less optimal approach and create a FrameworElement child class that has a Zoom property. Then you can bind that property to PanAndZoomImage a listen for property changes this way.

All the best,
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
Vladimir
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or