Beispiel #1
0
        void UpdateContent()
        {
            _ = NativeView ?? throw new InvalidOperationException($"{nameof(NativeView)} 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.");

            NativeView.Children.Clear();
            NativeView.EnsureBorderPath();

            if (VirtualView.PresentedContent is IView view)
            {
                NativeView.Children.Add(view.ToNative(MauiContext));
            }
        }