public override void SetVirtualView(IView view) { if (VisualElementRenderer == null && Context != null) { var renderer = Internals.Registrar.Registered.GetHandlerForObject <IVisualElementRenderer>(view, Context) ?? new Platform.Android.AppCompat.Platform.DefaultRenderer(Context); SetupRenderer(renderer); } if (VisualElementRenderer.Element != view) { VisualElementRenderer.SetElement((VisualElement)view); } else { base.SetVirtualView(view); } }
public override void SetVirtualView(IView view) { if (VisualElementRenderer == null) { var renderer = Internals.Registrar.Registered.GetHandlerForObject <IVisualElementRenderer>(view) ?? new Xamarin.Forms.Platform.iOS.Platform.DefaultRenderer(); SetupRenderer(renderer); } if (VisualElementRenderer.Element != view) { VisualElementRenderer.SetElement((VisualElement)view); } else { base.SetVirtualView(view); } }