<
slideView:PanAndZoomImage
Source
=
"{Binding Thumb}"
/>
So I want to add rotate animation which will be performed when image is loaded. So image must be appear by rotating itself.
Is there a way to do that ? A code snippet showing a example would be nice.
Thanks in advance,
David.
4 Answers, 1 is accepted
Thanks for writing.
PanAndZoomImage does not provide such functionality however it is trivial to implement.
All you need to do is to put an Image element on top of the pan and zoom image.
Initially the pan zoom's opacity will be zero and the image's will be 1. When the image is loaded you can apply your animation on the image. Then, when the animation finishes you just swap the opacities of PanAndZoomImage and the Image on top of it and you're done.
Victor
the Telerik team
Thanks for the answer. Agree it's a trivial to do, but not a "good" way to do that. So if I developed gallery app with lot of images in it then I have to keep a clone for every image and then remove it from tree. It's not a right way. I was hoping that Telerik controls will provide such a functionality, but it seems I have to wait for that. Any way thanks for the coll controls.
Kind Regards,
David
Yes, I suppose in the case of a gallery with many images that would be less than optimal. Actually, you can animate the pan and zoom image itself. You can create your own custom control that will aggregate PanAndZoomImage. Internally, you will wait for the image to be downloaded or opened and then you can animate the pan and zoom image. After the animation is finished you can allow the pan and zoom image to listen for user gestures. Finally, in your image list you can use the custom control as the data template for your images.
This way you will not have to dynamically add, remove or tweak any external elements.
Victor
the Telerik team
Agree related to custom control. I think it's a best way to fix the issue.
Thanks,
David.