protected virtual void AddChild( IElementRenderer childRenderer, DockRegion dockRegion) { var nativeChild = (FrameworkElement)childRenderer.NativeElement; NativeDockPanel.SetDock(nativeChild, ToXamlDockRegion(dockRegion)); this._panel.Children.Add(nativeChild); }
protected virtual void ReplaceChild( int index, IElementRenderer childRenderer, DockRegion dockRegion) { var nativeChild = (FrameworkElement)childRenderer.NativeElement; NativeDockPanel.SetDock(nativeChild, ToXamlDockRegion(dockRegion)); this._panel.Children[index] = nativeChild; }
public DockLayoutRenderer( XForms.Layouts.DockLayout layout) : base(layout) { this._panel = new NativeDockPanel(); this._panel.HorizontalAlignment = global::Windows.UI.Xaml.HorizontalAlignment.Stretch; this._panel.VerticalAlignment = global::Windows.UI.Xaml.VerticalAlignment.Stretch; this.SetNativeElement(this._panel); }
public UserControlRenderer( UserControl userControl) : base(userControl) { this._ownerDrawControl = new OwnerDrawControl(userControl) { IsTabStop = true, }; NativeDockPanel.SetDock(this._ownerDrawControl, NativeDockRegion.CenterOverlay); this._ownerDrawControl.Tapped += Control_Tapped; this.SetNativeElement(this._ownerDrawControl); }