private Table CreateControlHierarchy_CreateLayoutWithSideBar() { // Create an outer table and make all child controls into the right cell. // Use the left cell to render the side bar. Table outerTable = new WizardChildTable(Owner) { EnableTheming = false }; TableRow outerRow = new TableRow(); outerTable.Controls.Add(outerRow); // Use the existing sideBarTableCell if possible. TableCell outerLeftCell = Owner._sideBarTableCell ?? CreateControlHierarchy_CreateSideBarTableCell(); outerRow.Controls.Add(outerLeftCell); Owner._sideBarTableCell = outerLeftCell; Owner._renderSideBarDataList = false; // Right cell is used for header, step and navigation areas. TableCell outerRightCell = new TableCell() { // Maximize the inner default table Whidbey 143409. Height = Unit.Percentage(100) }; outerRow.Controls.Add(outerRightCell); var mainContentTable = new WizardDefaultInnerTable() { CellSpacing = 0, Height = Unit.Percentage(100), Width = Unit.Percentage(100) }; outerRightCell.Controls.Add(mainContentTable); // On Mac IE, render height:1px of the inner table cell, so the table sizes to contents. // Otherwise, Mac IE may give the table an arbitrary height (equal to the width of its contents). if (!Owner.DesignMode && Owner.IsMacIE5) { outerRightCell.Height = Unit.Pixel(1); } // Add the table into the Wizard control using (new WizardControlCollectionModifier(Owner)) { Owner.Controls.Add(outerTable); } CreateControlHierarchy_CleanUpOldSideBarList(Owner.SideBarList); Owner._sideBarList = CreateControlHierarchy_SetUpSideBarList(Owner._sideBarTableCell); _renderTable = outerTable; return mainContentTable; }
private Table CreateControlHierarchy_CreateLayoutWithoutSideBar() { // if sidebar is disabled, add mainContentTable directly into the Wizard control. var mainContentTable = new WizardChildTable(Owner) { EnableTheming = false }; using (new WizardControlCollectionModifier(Owner)) { Owner.Controls.Add(mainContentTable); } _renderTable = mainContentTable; return mainContentTable; }