GiampaoloGabba / Xamarin.Plugin.SharedTransitions

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

Can it work with Shell GoToAsync() ? #37

Closed jmkyarrow closed 4 years ago

jmkyarrow commented 4 years ago

Expected Behavior

When navigating between pages using Shell.Current.GoToAsync(), there should be a transition as specified.

Actual Behavior

The navigation isn't animated and just cuts from one page to another.

GiampaoloGabba commented 4 years ago

Well, honestly, i have never, ever used Shell in my apps outside the demo for this plugin :( Do you mind to create a simple repro of this issue so i can fork it and work on the Shell Renderer to make it work in such scenario?

Thank you

GiampaoloGabba commented 4 years ago

I made some investigations regarding this issue. With relative routes (not using the // prefix) everything is working fine, i have updated the shell demo with a GotoAsync between the ImageFromPage and ImageToPage.

Unfortunately, if you are using absolute routes (with // prefix), the shared transition cannot work because within an absolute navigation the new page will replace the navigation stack. This means that every information about the views to transition are destroyed.

More info from the Xamarin.Forms repository:

If you are using relative routes and still shared transitions doesnt work, please post a repro so i can find the problem :)

jmkyarrow commented 4 years ago

Thank you for your help, it's working now using relative routes, I really appreciate your effort :) Do you think there would be a way to have the background animation transition on absolute routes even though individual elements don't work?