Exemple #1
0
        public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx)
        {
            if (primElement == null)
            {
                var renderE = new CustomRenderBox(rootgfx, this.Width, this.Height);
                renderE.HasSpecificHeight = this.HasSpecificHeight;
                renderE.HasSpecificWidth  = this.HasSpecificWidth;
                renderE.SetController(this);
                renderE.SetVisible(this.Visible);
#if DEBUG
                //if (dbugBreakMe)
                //{
                //    renderE.dbugBreak = true;
                //}
#endif
                renderE.SetLocation(this.Left, this.Top);
                renderE.BackColor       = backColor;
                renderE.HasSpecificSize = true;
                renderE.SetViewport(this.ViewportX, this.ViewportY);
                //------------------------------------------------
                //create visual layer

                int childCount = this.ChildCount;
                for (int m = 0; m < childCount; ++m)
                {
                    renderE.AddChild(this.GetChild(m));
                }
                //set primary render element
                //---------------------------------
                this.primElement = renderE;
            }
            return(primElement);
        }
Exemple #2
0
        public void AddChild(UIElement ui)
        {
            if (this.uiList == null)
            {
                this.uiList = new UICollection(this);
            }

            needContentLayout = true;
            this.uiList.AddUI(ui);
            if (this.HasReadyRenderElement)
            {
                primElement.AddChild(ui);
                if (this.panelLayoutKind != BoxContentLayoutKind.Absolute)
                {
                    this.InvalidateLayout();
                }
            }

            if (ui.NeedContentLayout)
            {
                ui.InvalidateLayout();
            }
        }
Exemple #3
0
        public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx)
        {
            if (primElement == null)
            {
                var renderE = new CustomRenderBox(rootgfx, this.Width, this.Height);
                renderE.HasSpecificHeight = this.HasSpecificHeight;
                renderE.HasSpecificWidth = this.HasSpecificWidth;
                renderE.SetController(this);
                renderE.SetVisible(this.Visible);
#if DEBUG
                //if (dbugBreakMe)
                //{
                //    renderE.dbugBreak = true;
                //}
#endif
                renderE.SetLocation(this.Left, this.Top);
                renderE.BackColor = backColor;
                renderE.HasSpecificSize = true;
                renderE.SetViewport(this.ViewportX, this.ViewportY);
                //------------------------------------------------
                //create visual layer

                int childCount = this.ChildCount;
                for (int m = 0; m < childCount; ++m)
                {
                    renderE.AddChild(this.GetChild(m));
                }
                //set primary render element
                //---------------------------------
                this.primElement = renderE;
            }
            return primElement;
        }