Beispiel #1
0
        protected virtual void AddChild(
            IElementRenderer childRenderer,
            DockRegion dockRegion)
        {
            var nativeChild = (FrameworkElement)childRenderer.NativeElement;

            NativeDockPanel.SetDock(nativeChild, ToXamlDockRegion(dockRegion));
            this._panel.Children.Add(nativeChild);
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }