Exemplo n.º 1
0
        private void RecreateGridSplitter()
        {
            if (_paned != null)
            {
                this.RemoveFromContainer(_paned);
            }

            var orientation = Element.Orientation;

            switch (orientation)
            {
            case GridSplitterOrientation.Horizontal:
                _paned          = new HPaned();
                _paned.CanFocus = true;
                break;

            case GridSplitterOrientation.Vertical:
                _paned          = new VPaned();
                _paned.CanFocus = true;
                break;
            }

            Add(_paned);
            _paned.ShowAll();
        }
Exemplo n.º 2
0
        protected override void OnElementChanged(ElementChangedEventArgs <GridSplitter> e)
        {
            if (Control == null)
            {
                _paned = new HPaned();
                Add(_paned);
                _paned.ShowAll();

                SetNativeControl(this);
            }

            if (e.NewElement != null)
            {
                RecreateGridSplitter();
                UpdateContent1();
                UpdateContent2();
            }

            base.OnElementChanged(e);
        }