How to know that Scale is started

2 posts, 0 answers
  1. Vladimir
    Vladimir  avatar
    7 posts
    Member since:
    Dec 2012

    Posted 28 Jan 2013 Link to this post

         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>
                                       
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 30 Jan 2013 Link to this post

    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.
  3. DevCraft banner
Back to Top