+2006-05-25 Andrew Skiba <andrews@mainsoft.com>
+
+ * Page.cs, Control.cs: Fix the order of OnInit invocation of controls
+ created via master page content (see
+ http://lists.ximian.com/pipermail/mono-devel-list/2006-May/018585.html ).
+
2006-05-11 Andrew Skiba <andrews@mainsoft.com>
* Page.cs, PageTheme.cs: This patch uses LinkedStyleSheets from the
trace.Write ("control", String.Format ("InitRecursive {0} {1}", _userId, type_name));
}
#endif
-
if (HasControls ()) {
if ((stateMask & IS_NAMING_CONTAINER) != 0)
namingContainer = this;
}
}
+ ApplyTheme ();
+
stateMask |= INITING;
#if NET_2_0
if (Adapter != null)
#if NET_2_0
internal ControlSkin controlSkin;
- internal void ApplyThemeRecursive ()
+ internal void ApplyTheme ()
{
#if MONO_TRACE
TraceContext trace = (Context != null && Context.Trace.IsEnabled) ? Context.Trace : null;
trace.Write ("control", String.Format ("ApplyThemeRecursive {0} {1}", _userId, type_name));
}
#endif
- ControlSkin controlSkin = Page.PageTheme.GetControlSkin (GetType(), SkinID);
- if (controlSkin != null)
- controlSkin.ApplySkin (this);
-
- if (HasControls ()) {
- int len = _controls.Count;
- for (int i=0;i<len;i++)
- {
- Control c = _controls[i];
- c.ApplyThemeRecursive ();
- }
+ if (Page.PageTheme != null) {
+ ControlSkin controlSkin = Page.PageTheme.GetControlSkin (GetType (), SkinID);
+ if (controlSkin != null)
+ controlSkin.ApplySkin (this);
}
#if MONO_TRACE
}
if (_theme != null && _theme != "") {
_pageTheme = ThemeDirectoryCompiler.GetCompiledInstance ("./App_Themes/" + _theme + "/", _context);
- ApplyThemeRecursive ();
}
}
OnPreInit (EventArgs.Empty);
InitializeTheme ();
+ ApplyMasterPage ();
#endif
Trace.Write ("aspx.page", "Begin Init");
InitRecursive (null);
#if NET_2_0
OnInitComplete (EventArgs.Empty);
- ApplyMasterPage ();
if (_title != null && htmlHeader != null)
htmlHeader.Title = _title;