PanAndZoomImage, RadSlideView and RotateTransform

2 posts, 0 answers
  1. QMatteoQ
    QMatteoQ avatar
    6 posts
    Member since:
    Oct 2010

    Posted 09 Jul 2013 Link to this post

    Hi, I have a RadSlideView control in a Windows Phone 8 application, which uses, as ItemTemplate, a PanAndZoomImage control.
    I'm using this combination to have a complete image gallery: the user can swipe between the different pictures and have zooming support on each of it.
    Now I need to support rotation, since I'm retrieving the Exif information of the picture to determine the current orientation. Here is how my RadSlideView looks like:

    <telerikPrimitives:RadSlideView x:Name="slideView"
                                           ItemsSource="{Binding Items}"
                                           SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                                           IsLoopingEnabled="False" >
                           <telerikPrimitivesSlideView:PanAndZoomImage Margin="6,0,6,0" ZoomMode="Free" RenderTransformOrigin="0.5, 0.5" >
                                   <BitmapImage attachedProperties:FullImageDowloader.Source="{Binding Path=ImageDisplayedPath}" />
                                   <RotateTransform Angle="{Binding Path=Orientation, Converter={StaticResource OrientationToAngleConverter}}" />

    The OrientationToAngleConverter simply takes as input the Orientation property of the image (which is an enumerator with the possible combinations) and returns the rotation angle that should be applied.
    The problem is that the whole RadSlideView seems to be rotated, not just the image: when I'm on an image that has been artificially rotated using the RotateTransform, I need to swipe to the top to go to the next one and to swipe to the bottom go to the previous one. The problem seems to be connected to the RenderTransformOrigin property I'm using, but if I don't set it, since the origin point is not in the middle of the page, I simply can't see the rotated image because is out of the page.

    Do you have any idea on how to fix this behavior?

  2. Victor
    Victor avatar
    1349 posts

    Posted 12 Jul 2013 Link to this post

    Hello Matteo,

    I answered your question in the support ticket you posted about the same issue.

    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