Browse Source

2010-07-15 Marek Habersack <[email protected]>

	* PlaceHolder.cs, View.cs, WizardStepBase: added EnableTheming
	property

	* MultiViewControlBuilder.cs: added

More 2.0/4.0 metadata updates

svn path=/trunk/mcs/; revision=160448
Marek Habersack 15 years ago
parent
commit
f2f50f05da
29 changed files with 326 additions and 132 deletions
  1. 7 0
      mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
  2. 1 1
      mcs/class/System.Web/System.Web.UI.WebControls/MultiView.cs
  3. 46 0
      mcs/class/System.Web/System.Web.UI.WebControls/MultiViewControlBuilder.cs
  4. 1 0
      mcs/class/System.Web/System.Web.UI.WebControls/ObjectDataSourceView.cs
  5. 2 1
      mcs/class/System.Web/System.Web.UI.WebControls/PagerSettings.cs
  6. 5 21
      mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs
  7. 6 0
      mcs/class/System.Web/System.Web.UI.WebControls/PanelStyle.cs
  8. 106 57
      mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs
  9. 13 6
      mcs/class/System.Web/System.Web.UI.WebControls/PlaceHolder.cs
  10. 5 4
      mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs
  11. 0 2
      mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
  12. 3 4
      mcs/class/System.Web/System.Web.UI.WebControls/Repeater.cs
  13. 2 0
      mcs/class/System.Web/System.Web.UI.WebControls/SiteMapDataSource.cs
  14. 4 0
      mcs/class/System.Web/System.Web.UI.WebControls/SiteMapNodeItem.cs
  15. 4 2
      mcs/class/System.Web/System.Web.UI.WebControls/SiteMapViewType.cs
  16. 5 0
      mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
  17. 6 7
      mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
  18. 1 0
      mcs/class/System.Web/System.Web.UI.WebControls/Substitution.cs
  19. 20 9
      mcs/class/System.Web/System.Web.UI.WebControls/TemplatedWizardStep.cs
  20. 0 1
      mcs/class/System.Web/System.Web.UI.WebControls/TreeNodeBinding.cs
  21. 0 8
      mcs/class/System.Web/System.Web.UI.WebControls/ValidatedControlConverter.cs
  22. 10 4
      mcs/class/System.Web/System.Web.UI.WebControls/View.cs
  23. 1 3
      mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
  24. 5 2
      mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
  25. 13 0
      mcs/class/System.Web/System.Web.UI.WebControls/WizardStepBase.cs
  26. 2 0
      mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
  27. 1 0
      mcs/class/System.Web/System.Web.dll.sources
  28. 1 0
      mcs/class/System.Web/System.Web_test.dll.sources
  29. 56 0
      mcs/class/System.Web/Test/System.Web.UI.WebControls/MultiViewControlBuilderTest.cs

+ 7 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,10 @@
+2010-07-15  Marek Habersack  <[email protected]>
+
+	* PlaceHolder.cs, View.cs, WizardStepBase: added EnableTheming
+	property
+
+	* MultiViewControlBuilder.cs: added
+
 2010-07-14  Marek Habersack  <[email protected]>
 
 	* Menu.cs: fixed skip link rendering (no child controls are added

+ 1 - 1
mcs/class/System.Web/System.Web.UI.WebControls/MultiView.cs

@@ -38,7 +38,7 @@ using System.ComponentModel;
 
 namespace System.Web.UI.WebControls
 {
-//	[ControlBuilder (typeof(MultiViewControlBuilder)]
+	[ControlBuilder (typeof(MultiViewControlBuilder))]
 	[Designer ("System.Web.UI.Design.WebControls.MultiViewDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 	[ToolboxData ("<{0}:MultiView runat=\"server\"></{0}:MultiView>")]
 #if NET_2_0

+ 46 - 0
mcs/class/System.Web/System.Web.UI.WebControls/MultiViewControlBuilder.cs

@@ -0,0 +1,46 @@
+//
+// Authors:
+//	Marek Habersack <[email protected]>
+//
+// (C) 2010 Novell, Inc (http://novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Web;
+using System.Web.UI;
+
+namespace System.Web.UI.WebControls
+{
+	public class MultiViewControlBuilder : ControlBuilder
+	{
+		public MultiViewControlBuilder ()
+		{
+		}
+
+		public override void AppendSubBuilder (ControlBuilder subBuilder)
+		{
+			// LAMESPEC: docs suggest that only View controls are accepted, but tests
+			// show that anything goes here (including subBuilder.ControlType == null),
+			// so we're just passing the call up the chain
+			base.AppendSubBuilder (subBuilder);
+		}
+	}
+}

+ 1 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ObjectDataSourceView.cs

@@ -403,6 +403,7 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue ("{0}")]
 		public string OldValuesParameterFormatString {
 			get {
 				return oldValuesParameterFormatString != null ? oldValuesParameterFormatString : "{0}";

+ 2 - 1
mcs/class/System.Web/System.Web.UI.WebControls/PagerSettings.cs

@@ -44,7 +44,8 @@ namespace System.Web.UI.WebControls
 		StateBag ViewState = new StateBag ();
 		Control ctrl;
 		EventHandlerList events = new EventHandlerList ();
-		
+
+		[Browsable (false)]
 		public event EventHandler PropertyChanged {
 			add { events.AddHandler (propertyChangedEvent, value); }
 			remove { events.RemoveHandler (propertyChangedEvent, value); }

+ 5 - 21
mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs

@@ -41,9 +41,6 @@ namespace System.Web.UI.WebControls {
 	[Designer ("System.Web.UI.Design.WebControls.PanelDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 	[ParseChildren (false)]
 	[PersistChildren (true)]
-#if !NET_4_0
-	[ToolboxData ("<{0}:Panel runat=server>Panel</{0}:Panel>")]
-#endif
 	public class Panel : WebControl {
 
 		public Panel () : base (HtmlTextWriterTag.Div) 
@@ -124,11 +121,8 @@ namespace System.Web.UI.WebControls {
 		PanelStyle PanelStyle {
 			get { return (ControlStyle as PanelStyle); }
 		}
-#if NET_4_0
+
 		[UrlProperty]
-#else
-		[Bindable (true)]
-#endif
 		[DefaultValue ("")]
 		[Editor ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
 		[WebSysDescription ("")]
@@ -150,9 +144,7 @@ namespace System.Web.UI.WebControls {
 					ViewState ["BackImageUrl"] = value;
 			}
 		}
-#if !NET_4_0
-		[Bindable (true)]
-#endif
+
 		[DefaultValue (HorizontalAlign.NotSet)]
 		[WebSysDescription ("")]
 		[WebCategory ("Layout")]
@@ -173,9 +165,7 @@ namespace System.Web.UI.WebControls {
 					ViewState ["HorizontalAlign"] = value;
 			}
 		}
-#if !NET_4_0
-		[Bindable (true)]
-#endif
+
 		[DefaultValue (true)]
 		[WebSysDescription ("")]
 		[WebCategory ("Layout")]
@@ -198,9 +188,7 @@ namespace System.Web.UI.WebControls {
 		}
 		
 		[ThemeableAttribute (false)]
-#if NET_4_0
 		[DefaultValue ("")]
-#endif
 		public virtual string DefaultButton {
 			get {
 				return ViewState.GetString ("DefaultButton", String.Empty);
@@ -209,9 +197,8 @@ namespace System.Web.UI.WebControls {
 				ViewState ["DefaultButton"] = value;
 			}
 		}
-#if NET_4_0
+
 		[DefaultValue (ContentDirection.NotSet)]
-#endif
 		public virtual ContentDirection Direction {
 			get {
 				if (ControlStyleCreated) {
@@ -231,9 +218,7 @@ namespace System.Web.UI.WebControls {
 		}
 
 		[LocalizableAttribute (true)]
-#if NET_4_0
 		[DefaultValue ("")]
-#endif
 		public virtual string GroupingText {
 			get {
 				return ViewState.GetString ("GroupingText", String.Empty);
@@ -242,9 +227,8 @@ namespace System.Web.UI.WebControls {
 				ViewState ["GroupingText"] = value;
 			}
 		}
-#if NET_4_0
+
 		[DefaultValue (ScrollBars.None)]
-#endif
 		public virtual ScrollBars ScrollBars {
 			get {
 				if (ControlStyleCreated) {

+ 6 - 0
mcs/class/System.Web/System.Web.UI.WebControls/PanelStyle.cs

@@ -53,6 +53,8 @@ namespace System.Web.UI.WebControls
 		{
 		}
 
+		[DefaultValue ("")]
+		[UrlProperty]
 		public virtual string BackImageUrl {
 			get {
 				if (!CheckBit ((int) PanelStyles.BackImageUrl))
@@ -67,6 +69,7 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue (ContentDirection.NotSet)]
 		public virtual ContentDirection Direction {
 			get {
 				if (!CheckBit ((int) PanelStyles.Direction))
@@ -80,6 +83,7 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue (HorizontalAlign.NotSet)]
 		public virtual HorizontalAlign HorizontalAlign {
 			get {
 				if (!CheckBit ((int) PanelStyles.HorizontalAlign))
@@ -93,6 +97,7 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue (ScrollBars.None)]
 		public virtual ScrollBars ScrollBars {
 			get {
 				if (!CheckBit ((int) PanelStyles.ScrollBars))
@@ -106,6 +111,7 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue (true)]
 		public virtual bool Wrap {
 			get {
 				if (!CheckBit ((int) PanelStyles.Wrap))

+ 106 - 57
mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs

@@ -41,6 +41,8 @@ using System.Web.Security;
 namespace System.Web.UI.WebControls
 {
 	[Bindable (false)]
+	[DefaultEvent ("SendingMail")]
+	[Designer ("System.Web.UI.Design.WebControls.PasswordRecoveryDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 	public class PasswordRecovery : CompositeControl
 	{
 		static readonly object answerLookupErrorEvent = new object ();
@@ -116,9 +118,11 @@ namespace System.Web.UI.WebControls
 		{
 		}
 
+		[Browsable (false)]
+		[Filterable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
 		[Themeable (false)]
-		public virtual string Answer
-		{
+		public virtual string Answer {
 			get { return _answer != null ? _answer : string.Empty; }
 		}
 
@@ -136,6 +140,7 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["AnswerRequiredErrorMessage"] = value; }
 		}
 
+		[DefaultValue (1)]
 		public virtual int BorderPadding
 		{
 			get { return ViewState.GetInt ("BorderPadding", 1); }
@@ -154,12 +159,16 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["GeneralFailureText"] = value; }
 		}
 
+		[DefaultValue ("")]
+		[UrlProperty]
+		[Editor ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]	
 		public virtual string HelpPageIconUrl
 		{
 			get { return ViewState.GetString ("HelpPageIconUrl", String.Empty); }
 			set { ViewState ["HelpPageIconUrl"] = value; }
 		}
 
+		[DefaultValue ("")]
 		[Localizable (true)]
 		public virtual string HelpPageText
 		{
@@ -167,17 +176,21 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["HelpPageText"] = value; }
 		}
 
+		[DefaultValue ("")]
+		[UrlProperty]
+		[Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]	
 		public virtual string HelpPageUrl
 		{
 			get { return ViewState.GetString ("HelpPageUrl", String.Empty); }
 			set { ViewState ["HelpPageUrl"] = value; }
 		}
 
+		[NotifyParentProperty (true)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
 		[Themeable (false)]
-		public MailDefinition MailDefinition
-		{
-			get
-			{
+		public MailDefinition MailDefinition {
+			get {
 				if (_mailDefinition == null) {
 					_mailDefinition = new MailDefinition ();
 					if (IsTrackingViewState)
@@ -187,6 +200,7 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue ("")]
 		[Themeable (false)]
 		public virtual string MembershipProvider
 		{
@@ -194,9 +208,11 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["MembershipProvider"] = value; }
 		}
 
+		[Browsable (false)]
+		[Filterable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
 		[Themeable (false)]
-		public virtual string Question
-		{
+		public virtual string Question {
 			get { return ViewState.GetString ("Question", ""); }
 			private set { ViewState ["Question"] = value; }
 		}
@@ -229,6 +245,9 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["QuestionTitleText"] = value; }
 		}
 
+		[DefaultValue ("")]
+		[UrlProperty]
+		[Editor ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]	
 		public virtual string SubmitButtonImageUrl
 		{
 			get { return ViewState.GetString ("SubmitButtonImageUrl", String.Empty); }
@@ -242,6 +261,7 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["SubmitButtonText"] = value; }
 		}
 
+		[DefaultValue (ButtonType.Button)]
 		public virtual ButtonType SubmitButtonType
 		{
 			get
@@ -257,6 +277,9 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue ("")]
+		[UrlProperty]
+		[Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]	
 		[Themeable (false)]
 		public virtual string SuccessPageUrl
 		{
@@ -271,8 +294,8 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["SuccessText"] = value; }
 		}
 
-		public virtual LoginTextLayout TextLayout
-		{
+		[DefaultValue (LoginTextLayout.TextOnLeft)]
+		public virtual LoginTextLayout TextLayout {
 			get
 			{
 				object o = ViewState ["TextLayout"];
@@ -286,10 +309,10 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[DefaultValue ("")]
 		[Localizable (true)]
-		public virtual string UserName
-		{
-			get { return _username != null ? _username : ""; }
+		public virtual string UserName {
+			get { return _username != null ? _username : String.Empty; }
 			set { _username = value; }
 		}
 
@@ -328,6 +351,8 @@ namespace System.Web.UI.WebControls
 			set { ViewState ["UserNameTitleText"] = value; }
 		}
 
+		[Browsable (false)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
 		[TemplateContainer (typeof (PasswordRecovery))]
 		public virtual ITemplate QuestionTemplate
 		{
@@ -335,6 +360,8 @@ namespace System.Web.UI.WebControls
 			set { _questionTemplate = value; }
 		}
 
+		[Browsable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
 		public Control QuestionTemplateContainer
 		{
 			get {
@@ -349,6 +376,8 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[Browsable (false)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
 		[TemplateContainer (typeof (PasswordRecovery))]
 		public virtual ITemplate SuccessTemplate
 		{
@@ -356,6 +385,8 @@ namespace System.Web.UI.WebControls
 			set { _successTemplate = value; }
 		}
 
+		[Browsable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
 		public Control SuccessTemplateContainer
 		{
 			get {
@@ -370,17 +401,18 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
+		[Browsable (false)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
 		[TemplateContainer (typeof (PasswordRecovery))]
-		public virtual ITemplate UserNameTemplate
-		{
+		public virtual ITemplate UserNameTemplate {
 			get { return _userNameTemplate; }
 			set { _userNameTemplate = value; }
 		}
 
-		public Control UserNameTemplateContainer
-		{
-			get
-			{
+		[Browsable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+		public Control UserNameTemplateContainer {
+			get {
 				if (_userNameTemplateContainer == null) {
 					_userNameTemplateContainer = new UserNameContainer (this);
 					ITemplate template = UserNameTemplate;
@@ -392,10 +424,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public TableItemStyle FailureTextStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public TableItemStyle FailureTextStyle {
+			get {
 				if (_failureTextStyle == null) {
 					_failureTextStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -405,10 +439,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public TableItemStyle HyperLinkStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public TableItemStyle HyperLinkStyle {
+			get {
 				if (_hyperLinkStyle == null) {
 					_hyperLinkStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -418,10 +454,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public TableItemStyle InstructionTextStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public TableItemStyle InstructionTextStyle {
+			get {
 				if (_instructionTextStyle == null) {
 					_instructionTextStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -431,10 +469,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public TableItemStyle LabelStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public TableItemStyle LabelStyle {
+			get {
 				if (_labelStyle == null) {
 					_labelStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -444,10 +484,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public Style SubmitButtonStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public Style SubmitButtonStyle {
+			get {
 				if (_submitButtonStyle == null) {
 					_submitButtonStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -457,10 +499,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public TableItemStyle SuccessTextStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public TableItemStyle SuccessTextStyle {
+			get {
 				if (_successTextStyle == null) {
 					_successTextStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -470,10 +514,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public Style TextBoxStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public Style TextBoxStyle {
+			get {
 				if (_textBoxStyle == null) {
 					_textBoxStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -483,10 +529,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public TableItemStyle TitleTextStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public TableItemStyle TitleTextStyle {
+			get {
 				if (_titleTextStyle == null) {
 					_titleTextStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -496,10 +544,12 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		public Style ValidatorTextStyle
-		{
-			get
-			{
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[NotifyParentProperty (true)]
+		public Style ValidatorTextStyle {
+			get {
 				if (_validatorTextStyle == null) {
 					_validatorTextStyle = new TableItemStyle ();
 					if (IsTrackingViewState)
@@ -511,8 +561,7 @@ namespace System.Web.UI.WebControls
 
 		#region Protected Properties
 
-		protected override HtmlTextWriterTag TagKey
-		{
+		protected override HtmlTextWriterTag TagKey {
 			get { return HtmlTextWriterTag.Table; }
 		}
 

+ 13 - 6
mcs/class/System.Web/System.Web.UI.WebControls/PlaceHolder.cs

@@ -6,9 +6,6 @@
 //
 // (C) 2005 Novell, Inc (http://www.novell.com)
 //
-// TODO: Are we missing something in LoadViewState?
-// What to do in AddParsedSubObject
-//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
@@ -28,10 +25,20 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-namespace System.Web.UI.WebControls {
+using System;
+using System.ComponentModel;
+using System.Web.UI;
+
+namespace System.Web.UI.WebControls
+{
 	[ControlBuilder (typeof (PlaceHolderControlBuilder))]
-	public class PlaceHolder : Control {
-		// Nada?
+	public class PlaceHolder : Control
+	{
+		[BrowsableAttribute(true)]
+		public override bool EnableTheming {
+			get;
+			set;
+		}
 	}
 	
 }

+ 5 - 4
mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs

@@ -28,11 +28,13 @@
 
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Data;
 using System.Text;
 
 namespace System.Web.UI.WebControls
 {
+	[DefaultProperty ("PropertyName")]
 	public class ProfileParameter : Parameter
 	{
 		public ProfileParameter ()
@@ -84,10 +86,9 @@ namespace System.Web.UI.WebControls
 			return context.Profile [PropertyName];
 		}
 
-		public string PropertyName
-		{
-			get
-			{
+		[DefaultValue ("")]
+		public string PropertyName {
+			get {
 				object o = ViewState ["PropertyName"];
 				return (o != null) ? (string) o : string.Empty;
 			}

+ 0 - 2
mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs

@@ -491,7 +491,6 @@ namespace System.Web.UI.WebControls {
 		}
 
 		[WebSysDescription ("")]
-		[DefaultValue (TableCaptionAlign.NotSet)]
 		[WebCategory ("Accessibility")]
 		public TableCaptionAlign CaptionAlign {
 			get {return captionAlign;}
@@ -499,7 +498,6 @@ namespace System.Web.UI.WebControls {
 		}
 
 		[WebSysDescription ("")]
-		[DefaultValue (false)]
 		[WebCategory ("Accessibility")]
 		public bool UseAccessibleHeader {
 			get {return useAccessibleHeader;}

+ 3 - 4
mcs/class/System.Web/System.Web.UI.WebControls/Repeater.cs

@@ -52,8 +52,8 @@ namespace System.Web.UI.WebControls {
 	[Designer ("System.Web.UI.Design.WebControls.RepeaterDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 	[ParseChildren (true)]
 	[PersistChildren (false)]
-	public class Repeater : Control, INamingContainer {
-
+	public class Repeater : Control, INamingContainer
+	{
 		object dataSource;
 #if NET_2_0
 		IDataSource boundDataSource;
@@ -310,7 +310,6 @@ namespace System.Web.UI.WebControls {
 		}
 
 		[Browsable (true)]
-		[DefaultValue(false)]
 		public override bool EnableTheming {
 			get { return base.EnableTheming; }
 			set { base.EnableTheming = value; }
@@ -542,7 +541,7 @@ namespace System.Web.UI.WebControls {
 			}
 		}
 
-		protected virtual void OnPagePreLoad (object sender, EventArgs e) 
+		void OnPagePreLoad (object sender, EventArgs e) 
 		{
 			Initialize ();
 		}

+ 2 - 0
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapDataSource.cs

@@ -32,6 +32,7 @@
 
 using System;
 using System.Collections;
+using System.Drawing;
 using System.Web.UI;
 using System.Web.Util;
 using System.ComponentModel;
@@ -42,6 +43,7 @@ namespace System.Web.UI.WebControls
 	[PersistChildrenAttribute (false)]
 	[DesignerAttribute ("System.Web.UI.Design.WebControls.SiteMapDataSourceDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 	[ParseChildrenAttribute (true)]
+	[ToolboxBitmap ("")]
 	public class SiteMapDataSource : HierarchicalDataSourceControl, IDataSource, IListSource
 	{
 		static string[] emptyNames = new string[] { "DefaultView" };

+ 4 - 0
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapNodeItem.cs

@@ -29,9 +29,13 @@
 //
 
 #if NET_2_0
+using System;
+using System.ComponentModel;
+using System.Drawing;
 
 namespace System.Web.UI.WebControls
 {
+	[ToolboxItem (false)]
 	public class SiteMapNodeItem: WebControl, IDataItemContainer, INamingContainer
 	{
 		int itemIndex;

+ 4 - 2
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapViewType.cs

@@ -26,8 +26,10 @@
 //
 
 #if NET_2_0
-namespace System.Web.UI.WebControls {
-        public enum SiteMapViewType {
+namespace System.Web.UI.WebControls
+{
+        enum SiteMapViewType
+	{
                 Automatic = 0,
 		Flat = 1,
 		Path = 2,

+ 5 - 0
mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs

@@ -49,6 +49,7 @@ namespace System.Web.UI.WebControls {
 	[DefaultPropertyAttribute ("SelectQuery")]
 	[DesignerAttribute ("System.Web.UI.Design.WebControls.SqlDataSourceDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 	[DefaultEventAttribute ("Selecting")]
+	[ToolboxBitmap ("")]
 	public class SqlDataSource : DataSourceControl {
 
 		static readonly string [] emptyNames = new string [] { "DefaultView" };
@@ -240,6 +241,9 @@ namespace System.Web.UI.WebControls {
 		// LAME SPEC: the event is raised on setting only when the old value is different
 		// from the new one
 		string connectionString = String.Empty;
+#if NET_4_0
+		[MergableProperty (false)]
+#endif
 		[EditorAttribute ("System.Web.UI.Design.WebControls.SqlDataSourceConnectionStringEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
 		[DefaultValueAttribute ("")]
 		public virtual string ConnectionString {
@@ -365,6 +369,7 @@ namespace System.Web.UI.WebControls {
 			set { sqlCacheDependency = value; }
 		}
 
+		[TypeConverter ("System.Web.UI.DataSourceCacheDurationConverter")]
 		[DefaultValue (0)]
 		public virtual int CacheDuration {
 			get { return cacheDuration; }

+ 6 - 7
mcs/class/System.Web/System.Web.UI.WebControls/Style.cs

@@ -46,7 +46,7 @@ namespace System.Web.UI.WebControls {
 		internal const string BitStateKey = "_!SB";
 
 		[Flags]
-		public enum Styles 
+		internal enum Styles 
 		{
 			BackColor	= 0x00000008,
 			BorderColor	= 0x00000010,
@@ -212,14 +212,14 @@ namespace System.Web.UI.WebControls {
 			}
 		}
 
+		//[TypeConverter ("System.Web.UI.WebControls.EmptyStringExpandableObjectConverter")]
+		[CssClassProperty]
 		[DefaultValue("")]
 		[NotifyParentProperty(true)]
 		[WebSysDescription ("")]
 		[WebCategory ("Appearance")]
-		public string CssClass 
-		{
-			get 
-			{
+		public string CssClass {
+			get {
 				if (!CheckBit ((int) Styles.CssClass))
 				{
 					return String.Empty;
@@ -232,8 +232,7 @@ namespace System.Web.UI.WebControls {
 				return ret;
 			}
 
-			set 
-			{
+			set {
 				viewstate["CssClass"] = value;
 				SetBit ((int) Styles.CssClass);
 			}

+ 1 - 0
mcs/class/System.Web/System.Web.UI.WebControls/Substitution.cs

@@ -40,6 +40,7 @@ namespace System.Web.UI.WebControls
 	[DefaultProperty ("MethodName")]
 	[ParseChildren (true)]
 	[PersistChildren (false)]
+	[Designer ("System.Web.UI.Design.WebControls.SubstitutionDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 	public class Substitution : Control
 	{
 		[DefaultValue ("")]

+ 20 - 9
mcs/class/System.Web/System.Web.UI.WebControls/TemplatedWizardStep.cs

@@ -37,6 +37,8 @@ namespace System.Web.UI.WebControls
 	[BindableAttribute (false)]
 	[PersistChildren (false)]
 	[ParseChildren (true)]
+	[ToolboxItem (false)]
+	[ControlBuilder (typeof (WizardStepControlBuilder))]
 	public class TemplatedWizardStep : WizardStepBase
 	{
 		ITemplate _contentTemplate = null;
@@ -44,19 +46,27 @@ namespace System.Web.UI.WebControls
 		ITemplate _customNavigationTemplate = null;
 		Control _customNavigationTemplateContainer = null;
 
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[Browsable (false)]
 		[TemplateContainerAttribute (typeof (System.Web.UI.WebControls.Wizard))]
-		public virtual ITemplate ContentTemplate
-		{
+		public virtual ITemplate ContentTemplate {
 			get { return _contentTemplate; }
 			set { _contentTemplate = value; }
 		}
 
-		public Control ContentTemplateContainer
-		{
+		[Browsable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+		public Control ContentTemplateContainer {
 			get { return _contentTemplateContainer; }
 			internal set { _contentTemplateContainer = value; }
 		}
 
+		[DefaultValue (null)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
+		[PersistenceMode (PersistenceMode.InnerProperty)]
+		[Browsable (false)]
 		[TemplateContainerAttribute (typeof (System.Web.UI.WebControls.Wizard))]
 		public virtual ITemplate CustomNavigationTemplate
 		{
@@ -64,16 +74,17 @@ namespace System.Web.UI.WebControls
 			set { _customNavigationTemplate = value; }
 		}
 
-		[BindableAttribute (false)]
-		public Control CustomNavigationTemplateContainer
-		{
+		[Browsable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+		[Bindable (false)]
+		public Control CustomNavigationTemplateContainer {
 			get { return _customNavigationTemplateContainer; }
 			internal set { _customNavigationTemplateContainer = value; }
 		}
 
+		[Browsable (true)]
 		[MonoTODO("Why override?")]
-		public override string SkinID
-		{
+		public override string SkinID {
 			get { return base.SkinID; }
 			set { base.SkinID = value; }
 		}

+ 0 - 1
mcs/class/System.Web/System.Web.UI.WebControls/TreeNodeBinding.cs

@@ -68,7 +68,6 @@ namespace System.Web.UI.WebControls
 
 		[Localizable (true)]
 		[DefaultValue ("")]
-		[UrlProperty]
 		public string FormatString {
 			get {
 				object o = ViewState ["FormatString"];

+ 0 - 8
mcs/class/System.Web/System.Web.UI.WebControls/ValidatedControlConverter.cs

@@ -86,14 +86,6 @@ namespace System.Web.UI.WebControls {
 		{
 			return BaseValidator.GetValidationProperty (control) != null;
 		}
-
-		public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) {
-			return false;
-		}
-
-		public override bool GetStandardValuesSupported(ITypeDescriptorContext context) {
-			return true;
-		}
 		#endregion	// Public Instance Methods
 	}
 }

+ 10 - 4
mcs/class/System.Web/System.Web.UI.WebControls/View.cs

@@ -46,6 +46,12 @@ namespace System.Web.UI.WebControls
 		static readonly object ActivateEvent = new object();
 		static readonly object DeactivateEvent = new object();
 
+		[BrowsableAttribute(true)]
+		public override bool EnableTheming {
+			get { return base.EnableTheming; }
+			set { base.EnableTheming = value; }
+		}
+
 		public View ()
 		{
 			base.Visible = false;
@@ -89,11 +95,11 @@ namespace System.Web.UI.WebControls
 			set { base.Visible = value; }
 		}
 
-		public override bool Visible
-		{
+		[Browsable (false)]
+		[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+		public override bool Visible {
 			get { return base.Visible; }
-			set
-			{
+			set {
 				throw new InvalidOperationException ("The Visible property of a View control can only be set by setting the active View of a MultiView.");
 			}
 		}

+ 1 - 3
mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs

@@ -215,9 +215,7 @@ namespace System.Web.UI.WebControls {
 			}
 		}
 
-#if ONLY_1_1
-		[Bindable(true)]
-#endif		
+		[CssClassProperty]
 		[DefaultValue("")]
 		[WebSysDescription ("")]
 		[WebCategory ("Appearance")]

+ 5 - 2
mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs

@@ -33,6 +33,7 @@
 using System;
 using System.Collections;
 using System.ComponentModel;
+using System.Web.UI;
 
 namespace System.Web.UI.WebControls
 {
@@ -275,8 +276,9 @@ namespace System.Web.UI.WebControls
 		}
 		
 	    [UrlPropertyAttribute]
-	    [EditorAttribute ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
-	    [DefaultValueAttribute ("")]
+		    [EditorAttribute ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
+		[DefaultValueAttribute ("")]
+		[Themeable (false)]
 		public virtual string CancelDestinationPageUrl {
 			get {
 				object v = ViewState ["CancelDestinationPageUrl"];
@@ -389,6 +391,7 @@ namespace System.Web.UI.WebControls
 	    [UrlPropertyAttribute]
 	    [EditorAttribute ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
 	    [DefaultValueAttribute ("")]
+		[Themeable (false)]
 		public virtual string FinishDestinationPageUrl {
 			get {
 				object v = ViewState ["FinishDestinationPageUrl"];

+ 13 - 0
mcs/class/System.Web/System.Web.UI.WebControls/WizardStepBase.cs

@@ -54,6 +54,19 @@ namespace System.Web.UI.WebControls
 				ViewState ["AllowReturn"] = value;
 			}
 		}
+
+		[Browsable (true)]
+		public override bool EnableTheming {
+			get { return base.EnableTheming; }
+			set { base.EnableTheming = value; }
+		}
+
+		// .NET version of this property performs design-time checks, which we don't
+		// support, thus our version is just a do-nothing override
+		public override string ID {
+			get { return base.ID; }
+			set { base.ID = value; }
+		}
 		
 		[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
 		[BrowsableAttribute (false)]

+ 2 - 0
mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs

@@ -33,6 +33,7 @@
 #if NET_2_0
 using System.Collections;
 using System.Collections.Specialized;
+using System.Drawing;
 using System.Text;
 using System.Xml;
 using System.Xml.Xsl;
@@ -54,6 +55,7 @@ namespace System.Web.UI.WebControls {
 	[PersistChildren (false)]
 	[WebSysDescription ("Connect to an XML file.")]
 //	[WebSysDisplayName ("XML file")]
+	[ToolboxBitmap ("")]
 	public class XmlDataSource : HierarchicalDataSourceControl, IDataSource, IListSource {
 
 		string _data = string.Empty;

+ 1 - 0
mcs/class/System.Web/System.Web.dll.sources

@@ -955,6 +955,7 @@ System.Web.UI.WebControls/MenuItemTemplateContainer.cs
 System.Web.UI.WebControls/MonthChangedEventArgs.cs
 System.Web.UI.WebControls/MonthChangedEventHandler.cs
 System.Web.UI.WebControls/MultiView.cs
+System.Web.UI.WebControls/MultiViewControlBuilder.cs
 System.Web.UI.WebControls/NextPrevFormat.cs
 System.Web.UI.WebControls/ObjectDataSource.cs
 System.Web.UI.WebControls/ObjectDataSourceDisposingEventArgs.cs

+ 1 - 0
mcs/class/System.Web/System.Web_test.dll.sources

@@ -251,6 +251,7 @@ System.Web.UI.WebControls/MappingUrlTest.cs
 System.Web.UI.WebControls/MasterPageTest.cs
 System.Web.UI.WebControls/MonthChangedEventArgsTest.cs
 System.Web.UI.WebControls/MultiViewTest.cs
+System.Web.UI.WebControls/MultiViewControlBuilderTest.cs
 System.Web.UI.WebControls/PagedDataSourceTest.cs
 System.Web.UI.WebControls/PagerSettingsTest.cs
 System.Web.UI.WebControls/PanelTest.cs

+ 56 - 0
mcs/class/System.Web/Test/System.Web.UI.WebControls/MultiViewControlBuilderTest.cs

@@ -0,0 +1,56 @@
+//
+// Authors:
+//	Marek Habersack <[email protected]>
+//
+// (C) 2010 Novell, Inc (http://novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+using NUnit.Framework;
+
+namespace MonoTests.System.Web.UI.WebControls
+{
+	[TestFixture]
+	public class MultiViewControlBuilderTest
+	{
+		[Test (Description="Just check if it throws any exception")]
+		public void AppendSubBuilder ()
+		{
+			var bldr = new MultiViewControlBuilder ();
+			var subbldr = new ControlBuilder ();
+
+			bldr.AppendSubBuilder (subbldr);
+
+			subbldr = ControlBuilder.CreateBuilderFromType (null, null, typeof (TextBox), "TextBox", null, null, 0, "dummy");
+			bldr.AppendSubBuilder (subbldr);
+
+			subbldr = ControlBuilder.CreateBuilderFromType (null, null, typeof (View), "View", null, null, 0, "dummy");
+			bldr.AppendSubBuilder (subbldr);
+
+			subbldr = ControlBuilder.CreateBuilderFromType (null, null, typeof (string), "Literal", null, null, 0, "dummy");
+			bldr.AppendSubBuilder (subbldr);
+		}
+	}
+}