void UpdateContent() { _ = PlatformView ?? throw new InvalidOperationException($"{nameof(PlatformView)} should have been set by base class."); _ = VirtualView ?? throw new InvalidOperationException($"{nameof(VirtualView)} should have been set by base class."); _ = MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class."); // Cleanup the old view when reused PlatformView.ClearSubviews(); if (VirtualView.PresentedContent is IView view) { PlatformView.AddSubview(view.ToPlatform(MauiContext)); } }