This question is locked. New answers and comments are not allowed.
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:
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?
Thanks!
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}"
SelectionChanged
=
"SlideView_OnSelectionChanged"
IsShowOverlayContentOnTapEnabled
=
"False"
ItemRealizationMode
=
"ViewportItem"
IsLoopingEnabled
=
"False"
>
<
telerikPrimitives:RadSlideView.ItemTemplate
>
<
DataTemplate
>
<
Grid
>
<
telerikPrimitivesSlideView:PanAndZoomImage
Margin
=
"6,0,6,0"
ZoomMode
=
"Free"
RenderTransformOrigin
=
"0.5, 0.5"
>
<
telerikPrimitivesSlideView:PanAndZoomImage.Source
>
<
BitmapImage
attachedProperties:FullImageDowloader.Source
=
"{Binding Path=ImageDisplayedPath}"
/>
</
telerikPrimitivesSlideView:PanAndZoomImage.Source
>
<
telerikPrimitivesSlideView:PanAndZoomImage.RenderTransform
>
<
RotateTransform
Angle
=
"{Binding Path=Orientation, Converter={StaticResource OrientationToAngleConverter}}"
/>
</
telerikPrimitivesSlideView:PanAndZoomImage.RenderTransform
>
</
telerikPrimitivesSlideView:PanAndZoomImage
>
</
Grid
>
</
DataTemplate
>
</
telerikPrimitives:RadSlideView.ItemTemplate
>
</
telerikPrimitives:RadSlideView
>
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?
Thanks!