6. Transition events and ITransitionAware - GiampaoloGabba/Xamarin.Plugin.SharedTransitions GitHub Wiki
Starting from version 2.3 you can listen to transition events (or extend a transition container and use overrides) for start, stop and cancel.
Events
Both SharedNavigationPage and SharedTransitionShell expose these events:
| Event | Description | 
|---|---|
| TransitionStarted | Event invoked when a shared transition starts. SharedTransitionEventArgsare provided | 
| TransitionEnded | Event invoked when a shared transition ends. SharedTransitionEventArgsare provided | 
| TransitionCancelled | Event invoked when a shared transition is cancelled. SharedTransitionEventArgsare provided | 
SharedTransitionEventArgs properties
| Bindable property | Description | 
|---|---|
| PageFrom | Xamarin.Forms Pagewhere the transition started | 
| PageTo | Xamarin.Forms Pagewhere the transition ended | 
| NavOperation | Enumthat indicate the navigation operation (PushorPop) | 
Overrides
You can create your custom SharedNavigationPage or SharedTransitionShell and override these methods:
| Method | Description | 
|---|---|
| OnTransitionStarted | Invoked when a shared transition starts. SharedTransitionEventArgsare provided | 
| OnTransitionEnded | Invoked when a shared transition ends. SharedTransitionEventArgsare provided | 
| OnTransitionCancelled | Invoked when a shared transition is cancelled. SharedTransitionEventArgsare provided | 
Every overrides comes with a SharedTransitionEventArgs property.
ITransitionAware
You can also listen to transition events inside a page! Just implement the ITransitionAware interface like this:
public partial class ImageFromPage : ContentPage, ITransitionAware
{
    public ImageFromPage()
    {
        InitializeComponent();
    }
    public void OnTransitionStarted(SharedTransitionEventArgs args)
    {
        if (args.PageFrom == this && args.NavOperation == NavOperation.Push)
            DisplayAlert("Message", "Shared Transition started","ok");
    }
    public void OnTransitionEnded(SharedTransitionEventArgs args)
    {
    }
    public void OnTransitionCancelled(SharedTransitionEventArgs args)
    {
    }
}
Note
When implementing ITransitionAware you will only be notified of the transition events that the page participates in
CurrentTransition observable property
ObservableProperty<SharedTransitionEventArgs> CurrentTransition { get; }
The current transition being executed (null when there is no transition active).
You can read the current value with: CurrentTransition.Get() or subscribe to the Changed event:
CurrentTransition.Changed += data =>
{
    Debug.WriteLine($"CurrentTransition Changed: {data?.NavOperation} {data?.PageFrom} {data?.PageTo}");
};