void ITemplate.InstantiateIn(Control container) { Table table = new WizardDefaultInnerTable(); // Increase the default space and padding so the layout // of the buttons look good. Also, to make custom border // visible. VSWhidbey 377069 table.CellSpacing = 5; table.CellPadding = 5; container.Controls.Add(table); _row = new TableRow(); table.Rows.Add(_row); if (_button1ID != null) { CreateButtonControl(_buttons[0], _button1ID, _button1CausesValidation, MovePreviousCommandName); } if (_button2ID != null) { CreateButtonControl(_buttons[1], _button2ID, true /* causesValidation */, _templateType == WizardTemplateType.FinishNavigationTemplate ? MoveCompleteCommandName : MoveNextCommandName); } CreateButtonControl(_buttons[2], _button3ID, false /* causesValidation */, CancelCommandName); }
private Table CreateControlHierarchy_CreateLayoutWithSideBar() { Wizard.WizardChildTable table3 = new Wizard.WizardChildTable(base.Owner) { EnableTheming = false }; Table child = table3; TableRow row = new TableRow(); child.Controls.Add(row); TableCell cell = base.Owner._sideBarTableCell ?? this.CreateControlHierarchy_CreateSideBarTableCell(); row.Controls.Add(cell); base.Owner._sideBarTableCell = cell; base.Owner._renderSideBarDataList = false; TableCell cell2 = new TableCell { Height = Unit.Percentage(100.0) }; row.Controls.Add(cell2); WizardDefaultInnerTable table2 = new WizardDefaultInnerTable { CellSpacing = 0, Height = Unit.Percentage(100.0), Width = Unit.Percentage(100.0) }; cell2.Controls.Add(table2); if (!base.Owner.DesignMode && base.Owner.IsMacIE5) { cell2.Height = Unit.Pixel(1); } using (new Wizard.WizardControlCollectionModifier(base.Owner)) { base.Owner.Controls.Add(child); } base.CreateControlHierarchy_CleanUpOldSideBarList(base.Owner.SideBarList); base.Owner._sideBarList = base.CreateControlHierarchy_SetUpSideBarList(base.Owner._sideBarTableCell); this._renderTable = child; return table2; }
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; }
void ITemplate.InstantiateIn(Control container) { Table child = new WizardDefaultInnerTable { CellSpacing = 5, CellPadding = 5 }; container.Controls.Add(child); this._row = new TableRow(); child.Rows.Add(this._row); if (this._button1ID != null) { this.CreateButtonControl(this._buttons[0], this._button1ID, this._button1CausesValidation, Wizard.MovePreviousCommandName); } if (this._button2ID != null) { this.CreateButtonControl(this._buttons[1], this._button2ID, true, (this._templateType == Wizard.WizardTemplateType.FinishNavigationTemplate) ? Wizard.MoveCompleteCommandName : Wizard.MoveNextCommandName); } this.CreateButtonControl(this._buttons[2], this._button3ID, false, Wizard.CancelCommandName); }