public WpfNativeNode(Node?parent, Context context, WpfNative <TNative> element) : base(parent, context, element) { control = element.Create(); var layerNode = new NativeLayerNode(control); layer = (NativeLayer)context.Layer.AddChild(layerNode); Element.Update(control); }
protected override void UpdateElement(WpfNative <TNative> oldElement, Context oldContext) { if (oldContext.Layer != Context.Layer) { layer.Dispose(); var layerNode = new NativeLayerNode(control); layer = (NativeLayer)Context.Layer.AddChild(layerNode); } Element.Update(control); }