Closed conor-codes closed 2 years ago
hello, umm this is strange, you should be able to extend the SharedTransitionShellRenderer
without issues.
Please note that SharedTransitionShell
is not the renderer, it is the xamarin.forms class that enable the shared transitions on shell. This class, then, calls the renderer in the platform specific code.
For example, in iOS you should be able to extend the renderer like this:
using Plugin.SharedTransitions;
using Plugin.SharedTransitions.Platforms.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly:ExportRenderer(typeof(SharedTransitionShell), typeof(CustomShellRenderer))]
namespace Plugin.SharedTransitions.Platforms.iOS
{
public class CustomShellRenderer: SharedTransitionShellRenderer
{
..... your code here
}
}
just be while overriding the CreateShellSectionRenderer
, be sure to call the base.CreateShellSectionRenderer(shellSection) at the end of the method or transitions will not work.
I had the same problem but it works fine when setting the first parameter of ExportRendererAttribute
to AppShell
(or equivalent) which is good enough for me!
I had the same problem but it works fine when setting the first parameter of
ExportRendererAttribute
toAppShell
(or equivalent) which is good enough for me!
Thanks! Yes, as long as you extend SharedTransitionShellRenderer in your custom renderer you can export to AppShell
and should works!
Hello,
I've been working through the sample solution and have created a project that transitions between pages correctly, I need to create a custom renderer to alter the appearance of the app shell. Is it possible to extend the SharedTransitionShell? Everything I've tried has failed to recognise the custom renderer, works fine when extending the base shell component just not the SharedTransitionShell.
Any help would be appreciated, Thanks :)