/// <summary> /// This member overrides Control.CreateControlHierarchy /// </summary> protected virtual void CreateControlHierarchy() { // NEVER hide controls on this routine // some events WILL NOT FIRED this.Controls.Clear(); var table = new Table(); this.Controls.Add(table); // Prepare Control Hierarchy var contentRow = new TableRow(); contentRow.Controls.Add(this.GetVerticalSeparator()); contentRow.Controls.Add(this.LeftPane); var leftToContentSeparator = this.GetVerticalSeparator(); contentRow.Controls.Add(leftToContentSeparator); if (this.LeftPaneTemplate != null) { Control leftPaneContainer = new DesktopPanesTemplate(this); this.LeftPaneTemplate.InstantiateIn(leftPaneContainer); this.LeftPane.Controls.AddAt(0, leftPaneContainer); this.LeftPane.Controls.AddAt(1, this.GetHorizontalSeparator()); } if (this.ContentPaneTemplate != null) { Control contentPaneContainer = new DesktopPanesTemplate(this); this.ContentPaneTemplate.InstantiateIn(contentPaneContainer); this.ContentPane.Controls.AddAt(0, contentPaneContainer); this.ContentPane.Controls.AddAt(1, this.GetHorizontalSeparator()); } contentRow.Controls.Add(this.ContentPane); var contentToRightSeparator = this.GetVerticalSeparator(); contentRow.Controls.Add(contentToRightSeparator); contentRow.Controls.Add(this.RightPane); if (this.RightPaneTemplate != null) { Control rightPaneContainer = new DesktopPanesTemplate(this); this.RightPaneTemplate.InstantiateIn(rightPaneContainer); this.RightPane.Controls.AddAt(0, rightPaneContainer); this.RightPane.Controls.AddAt(1, this.GetHorizontalSeparator()); } contentRow.Controls.Add(this.GetVerticalSeparator()); table.Controls.Add(contentRow); }
/// <summary> /// Returns a reference to Horizontal separator /// </summary> /// <returns> /// </returns> protected Control GetHorizontalSeparator() { if (this.HorizontalSeparatorTemplate == null) { return(new Control()); } Control horizontalSeparatorContainer = new DesktopPanesTemplate(this); this.HorizontalSeparatorTemplate.InstantiateIn(horizontalSeparatorContainer); return(horizontalSeparatorContainer); }
/// <summary> /// Returns a reference to Vertical separator /// </summary> /// <returns> /// </returns> protected TableCell GetVerticalSeparator() { var tc = new TableCell(); if (this.VerticalSeparatorTemplate != null) { Control verticalSeparatorContainer = new DesktopPanesTemplate(this); this.VerticalSeparatorTemplate.InstantiateIn(verticalSeparatorContainer); tc.Controls.Add(verticalSeparatorContainer); } return(tc); }
/// <summary> /// Returns a reference to Vertical separator /// </summary> /// <returns> /// </returns> protected TableCell GetVerticalSeparator() { var tc = new TableCell(); if (this.VerticalSeparatorTemplate != null) { Control verticalSeparatorContainer = new DesktopPanesTemplate(this); this.VerticalSeparatorTemplate.InstantiateIn(verticalSeparatorContainer); tc.Controls.Add(verticalSeparatorContainer); } return tc; }
/// <summary> /// Returns a reference to Horizontal separator /// </summary> /// <returns> /// </returns> protected Control GetHorizontalSeparator() { if (this.HorizontalSeparatorTemplate == null) { return new Control(); } Control horizontalSeparatorContainer = new DesktopPanesTemplate(this); this.HorizontalSeparatorTemplate.InstantiateIn(horizontalSeparatorContainer); return horizontalSeparatorContainer; }