public override void SetVirtualView(IView view)
        {
            base.SetVirtualView(view);

            _ = 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.View = view;
            NativeView.CrossPlatformMeasure = VirtualView.CrossPlatformMeasure;
            NativeView.CrossPlatformArrange = VirtualView.CrossPlatformArrange;

            // Remove any previous children
            NativeView.ClearSubviews();

            foreach (var child in VirtualView)
            {
                NativeView.AddSubview(child.ToNative(MauiContext));
            }
        }
 public void Clear()
 {
     NativeView.ClearSubviews();
 }
Esempio n. 3
0
 public void Clear()
 {
     PlatformView.ClearSubviews();
 }