TopContentView by Lelelo1

<PackageReference Include="TopContentView" Version="1.0.2" />

 AsyncEventListener

public class AsyncEventListener
using System; using System.Threading.Tasks; using Xamarin.Forms; namespace Namespace { public class AsyncEventListener { private object sender; private EventArgs eventArgs; public Task<double> Successfully { get; } public AsyncEventListener() { Func<double> function = delegate { View view = sender as View; if (view == null) throw new Exception("AsyncEventListener could not listen for SizeChanged on " + sender?.ToString() + " as it was not a View"); Console.WriteLine("Got height"); view.SizeChanged -= Listen; return view.Height; }; Successfully = new Task<double>(function); } public void Listen(object sender, EventArgs eventArgs) { this.sender = sender; this.eventArgs = eventArgs; if (!Successfully.IsCompleted) { Console.WriteLine("running synchornisously"); Successfully.RunSynchronously(); } } } }