Author: igorz
Date: 2007-02-11 12:09:34 -0500 (Sun, 11 Feb 2007)
New Revision: 72624
Modified:
trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
Log:
2007-02-11 Igor Zelmanovich <[EMAIL PROTECTED]>
* Wizard.cs: refactoring:
used ContainedTable for ID attribute is rendered properly.
Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-02-11 17:00:14 UTC (rev 72623)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-02-11 17:09:34 UTC (rev 72624)
@@ -1,7 +1,13 @@
2007-02-11 Igor Zelmanovich <[EMAIL PROTECTED]>
+ * Wizard.cs: refactoring:
+ used ContainedTable for ID attribute is rendered properly.
+
+2007-02-11 Igor Zelmanovich <[EMAIL PROTECTED]>
+
* CreateUserWizard.cs:
- * Wizard.cs: fixed: SideBar
+ * Wizard.cs:
+ fixed SideBar.
2007-02-11 Igor Zelmanovich <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
2007-02-11 17:00:14 UTC (rev 72623)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
2007-02-11 17:09:34 UTC (rev 72624)
@@ -847,74 +847,72 @@
protected internal override void CreateChildControls ()
{
CreateControlHierarchy ();
+ }
+
+ protected virtual void CreateControlHierarchy ()
+ {
+ styles.Clear ();
+
+ wizardTable = new ContainedTable (this);
+
+ Table contentTable = wizardTable;
+
+ if (DisplaySideBar) {
+ contentTable = new Table ();
+ contentTable.CellPadding = 0;
+ contentTable.CellSpacing = 0;
+ contentTable.Height = new Unit ("100%");
+ contentTable.Width = new Unit ("100%");
+
+ TableRow row = new TableRow ();
+
+ TableCellNamingContainer sideBarCell = new
TableCellNamingContainer ();
+ sideBarCell.ID = "SideBarContainer";
+ sideBarCell.ControlStyle.Height =
Unit.Percentage (100);
+ CreateSideBar (sideBarCell);
+ row.Cells.Add (sideBarCell);
+
+ TableCell contentCell = new TableCell ();
+ contentCell.Controls.Add (contentTable);
+ contentCell.Height = new Unit ("100%");
+ row.Cells.Add (contentCell);
+
+ wizardTable.Rows.Add (row);
+ }
+
+ AddHeaderRow (contentTable);
+
+ TableRow viewRow = new TableRow ();
+ TableCell viewCell = new TableCell ();
+
+ customNavigation = null;
+ multiView = new MultiView ();
+ foreach (View v in WizardSteps) {
+ if (v is TemplatedWizardStep)
+ InstantiateTemplateStep
((TemplatedWizardStep) v);
+ multiView.Views.Add (v);
+ }
+ multiView.ActiveViewIndex = ActiveStepIndex;
+
+ RegisterApplyStyle (viewCell, StepStyle);
+ viewCell.Controls.Add (multiView);
+ viewRow.Cells.Add (viewCell);
+ viewRow.Height = new Unit ("100%");
+ contentTable.Rows.Add (viewRow);
+
+ TableRow buttonRow = new TableRow ();
+ _navigationCell = new TableCell ();
+ _navigationCell.HorizontalAlign = HorizontalAlign.Right;
+ RegisterApplyStyle (_navigationCell, NavigationStyle);
+ CreateButtonBar (_navigationCell);
+ buttonRow.Cells.Add (_navigationCell);
+ contentTable.Rows.Add (buttonRow);
+
+ Controls.SetReadonly (false);
+ Controls.Add (wizardTable);
+ Controls.SetReadonly (true);
}
-
- protected virtual void CreateControlHierarchy ()
- {
- styles.Clear ();
- wizardTable = new Table ();
- wizardTable.CellPadding = CellPadding;
- wizardTable.CellSpacing = CellSpacing;
- wizardTable.ID = this.ID;
-
- AddHeaderRow (wizardTable);
-
- TableRow viewRow = new TableRow ();
- TableCell viewCell = new TableCell ();
-
- customNavigation = null;
- multiView = new MultiView ();
- foreach (View v in WizardSteps) {
- if (v is TemplatedWizardStep)
- InstantiateTemplateStep
((TemplatedWizardStep) v);
- multiView.Views.Add (v);
- }
- multiView.ActiveViewIndex = ActiveStepIndex;
-
- RegisterApplyStyle (viewCell, StepStyle);
- viewCell.Controls.Add (multiView);
- viewRow.Cells.Add (viewCell);
- viewRow.Height = new Unit ("100%");
- wizardTable.Rows.Add (viewRow);
-
- TableRow buttonRow = new TableRow ();
- _navigationCell = new TableCell ();
- _navigationCell .HorizontalAlign =
HorizontalAlign.Right;
- RegisterApplyStyle (_navigationCell,
NavigationStyle);
- CreateButtonBar (_navigationCell);
- buttonRow.Cells.Add (_navigationCell);
- wizardTable.Rows.Add (buttonRow);
-
- if (DisplaySideBar) {
- Table contentTable = wizardTable;
- contentTable.Height = new Unit ("100%");
- contentTable.Width = new Unit ("100%");
-
- wizardTable = new Table ();
- wizardTable.CellPadding = CellPadding;
- wizardTable.CellSpacing = CellSpacing;
- TableRow row = new TableRow ();
-
- TableCellNamingContainer sideBarCell =
new TableCellNamingContainer ();
- sideBarCell.ID = "SideBarContainer";
- sideBarCell.ControlStyle.Height =
Unit.Percentage (100);
- CreateSideBar (sideBarCell);
- row.Cells.Add (sideBarCell);
-
- TableCell contentCell = new TableCell
();
- contentCell.Controls.Add (contentTable);
- contentCell.Height = new Unit ("100%");
- row.Cells.Add (contentCell);
-
- wizardTable.Rows.Add (row);
- }
-
- Controls.SetReadonly (false);
- Controls.Add (wizardTable);
- Controls.SetReadonly (true);
- }
-
internal virtual void
InstantiateTemplateStep(TemplatedWizardStep step)
{
BaseWizardContainer contentTemplateContainer = new
BaseWizardContainer ();
@@ -1161,7 +1159,8 @@
void AddHeaderRow (Table table)
{
TableRow row = new TableRow ();
- _headerCell = new WizardHeaderCell ();
+ _headerCell = new WizardHeaderCell ();
+ _headerCell.ID = "HeaderContainer";
RegisterApplyStyle (_headerCell, HeaderStyle);
if (headerTemplate != null) {
headerTemplate.InstantiateIn (_headerCell);
@@ -1395,8 +1394,6 @@
void PrepareControlHierarchy ()
{
- wizardTable.ApplyStyle (ControlStyle);
-
// header
if (!_headerCell.Initialized) {
if (String.IsNullOrEmpty (HeaderText))
@@ -1510,14 +1507,19 @@
}
}
- class WizardHeaderCell : TableCell
+ class WizardHeaderCell : TableCell, INamingContainer
{
bool _initialized;
public bool Initialized {
get { return _initialized; }
+ }
+
+ public WizardHeaderCell ()
+ {
+ SetBindingContainer (false);
}
-
+
public void ConfirmInitState ()
{
_initialized = true;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches