GiampaoloGabba / Xamarin.Plugin.SharedTransitions

Shared Element Transitions between pages in Xamarin.Forms (IOS/Android)
MIT License
414 stars 57 forks source link

Circle images #24

Closed TrueGeek closed 4 years ago

TrueGeek commented 4 years ago

Has anyone found a way to get this to work with circle images?

I've got something like this:

<Frame CornerRadius="20">
  <Image />
</Frame>

If you place the sharedTransitions:Transition.Name on the Image then the image will transition as a square. If you place it on the Frame then it transitions as a circle, but with a black background instead of the image background.

Either way it looks funny.

I've also tried it with Syncfusions SfBadgeView and it operates the same was as the Frame (as a circle with a solid black background).

GiampaoloGabba commented 4 years ago

Have you tried to animate both the frame and the image? Something like:

<Frame CornerRadius="20" sharedTransitions:Transition.Name="FrameTransition">
  <Image " sharedTransitions:Transition.Name="ImageTransitionTransition" />
</Frame>

Your destination page will need both the frame and image, though.