public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { //first time var element = new CustomRenderBox(rootgfx, this.Width, this.Height); element.SetLocation(this.Left, this.Top); element.BackColor = this.backColor; element.HasSpecificSize = true; //----------------------------- // create default layer for node content //----------------------------- uiNodeIcon = new ImageBox(16, 16);//create with default size SetupNodeIconBehaviour(uiNodeIcon); element.AddChild(uiNodeIcon); //----------------------------- myTextRun = new CustomTextRun(rootgfx, 10, 17); myTextRun.SetLocation(16, 0); myTextRun.Text = "Test01"; element.AddChild(myTextRun); //----------------------------- this.primElement = element; } return(primElement); }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { var renderE = new CustomRenderBox(rootgfx, this.Width, this.Height); renderE.SetLocation(this.Left, this.Top); renderE.BackColor = backColor; renderE.HasSpecificSize = true; renderE.SetController(this); //------------------------------------------------ //create visual layer if (this.landPart != null) { renderE.AddChild(this.landPart); } if (this.floatPart != null) { } //--------------------------------- primElement = renderE; } return(primElement); }
//-------------------------------------------------------------------------- void CreateVScrollbarContent(RootGraphic rootgfx) { CustomRenderBox bgBox = new CustomRenderBox(rootgfx, this.Width, this.Height); bgBox.HasSpecificSize = true; bgBox.SetController(this); bgBox.SetLocation(this.Left, this.Top); //--------------------------------------------------------- slideBox.ScrollBarType = ScrollBarType.Vertical; slideBox.SetLocation(0, minmax_boxHeight); slideBox.SetSize(this.Width, this.Height - minmax_boxHeight * 2); RenderElement sliderRenderE = slideBox.GetPrimaryRenderElement(rootgfx); bgBox.AddChild(sliderRenderE); //MinButton SetupMinButtonProperties(bgBox); //MaxButton SetupMaxButtonProperties(bgBox); //ScrollButton SetupVerticalScrollButtonProperties(bgBox); //-------------- this.mainBox = bgBox; }
public void AddChildNode(TreeNode treeNode) { if (childNodes == null) { childNodes = new List <TreeNode>(); } this.childNodes.Add(treeNode); treeNode.parentNode = this; //--------------------------- //add treenode presentaion if (this.isOpen) { if (this.primElement != null) { //add child presentation //below here //create layers //add to layer var tnRenderElement = treeNode.GetPrimaryRenderElement(primElement.Root); tnRenderElement.SetLocation(indentWidth, newChildNodeY); primElement.AddChild(tnRenderElement); newChildNodeY += tnRenderElement.Height; //----------------- } } //--------------------------- }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { var renderE = new CustomRenderBox(rootgfx, this.Width, this.Height); renderE.SetLocation(this.Left, this.Top); renderE.BackColor = backColor; renderE.SetController(this); renderE.HasSpecificSize = true; //------------------------------------------------ //create visual layer int uiCount = this.uiList.Count; for (int m = 0; m < uiCount; ++m) { renderE.AddChild(uiList.GetElement(m)); } //--------------------------------- renderE.SetVisible(this.Visible); primElement = renderE; } return(primElement); }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { var renderE = new CustomRenderBox(rootgfx, this.Width, this.Height); this.SetLocation(this.Left, this.Top); renderE.BackColor = backColor; renderE.SetController(this); renderE.HasSpecificSize = true; //------------------------------------------------ //create visual layer if (this.landPart != null) { renderE.AddChild(this.landPart); } if (this.floatPart != null) { } //--------------------------------- primElement = renderE; } return primElement; }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { var renderE = new CustomRenderBox(rootgfx, this.Width, this.Height); renderE.SetLocation(this.Left, this.Top); renderE.BackColor = backColor; renderE.SetController(this); renderE.HasSpecificSize = true; //------------------------------------------------ //create visual layer int n = this.uiList.Count; for (int m = 0; m < n; ++m) { renderE.AddChild(uiList.GetElement(m)); } //--------------------------------- primElement = renderE; } return primElement; }
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(); } }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { //first time var element = new CustomRenderBox(rootgfx, this.Width, this.Height); element.SetLocation(this.Left, this.Top); element.BackColor = this.backColor; element.HasSpecificSize = true; //----------------------------- // create default layer for node content //----------------------------- uiNodeIcon = new ImageBox(16, 16);//create with default size SetupNodeIconBehaviour(uiNodeIcon); element.AddChild(uiNodeIcon); //----------------------------- myTextRun = new CustomTextRun(rootgfx, 10, 17); myTextRun.SetLocation(16, 0); myTextRun.Text = "Test01"; element.AddChild(myTextRun); //----------------------------- this.primElement = element; } return primElement; }