System.Windows.Forms 1.0.5000.0 2.0.0.0 System.Windows.Forms.ContainerControl System.Runtime.InteropServices.ComVisible(true) System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch) System.ComponentModel.Designer("System.Windows.Forms.Design.UserControlDocumentDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.ComponentModel.Design.IRootDesigner)) System.ComponentModel.Designer("System.Windows.Forms.Design.ControlDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.ComponentModel.DesignerCategory("UserControl") System.ComponentModel.DefaultEvent("Load") By extending , inherits all the standard positioning and mnemonic-handling code that is necessary in a user control. The gives you the ability to create controls that can be used in multiple places within an application or organization. You can include all the code needed for validation of common data you ask the user to input; some examples of this are e-mail addresses (see Example section), telephone numbers, and postal codes. Another efficient use of the user control is to simply preload a or with static items you commonly use in almost every application; some examples of this are countries/regions, cities, states, and office locations. For more information about authoring custom controls, see Developing Windows Forms Controls with the .NET Framework. You might consider creating a namespace that contains several classes of user controls and compiling it into one DLL. This DLL can be referenced and distributed with the application or all applications within an organization. This gives you the ability to reference the user control in many applications and save time laying out and coding the contained elements of the user control. A user control also gives you consistency within or across applications; for example, all address information input blocks will all have the same appearance and behavior. Consistency gives your application a more polished and professional appearance. You can host Windows Forms derived classes inside of a form, on another , inside of Internet Explorer on a Web page, or inside a control hosted on a form. When hosting a inside of the control, you cannot turn off Visual Styles using the META tag value MSThemeCompatible. For more information about Visual Styles, see Rendering Controls with Visual Styles. Note that for Smartphone applications, this control requires Windows Mobile Version 5.0 software for Smartphones. Provides an empty control that can be used to create other controls. Constructor You do not typically create an instance of . To create your own user control class, inherit from the class. Initializes a new instance of the class. 1.0.5000.0 2.0.0.0 Property 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Visible) System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always) System.ComponentModel.Browsable(true) System.Boolean To be added. To be added. To be added. Event 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always) System.ComponentModel.Browsable(true) System.EventHandler To be added. Occurs when the property changes. Property 2.0.0.0 System.ComponentModel.DefaultValue(System.Windows.Forms.AutoSizeMode.GrowOnly) System.ComponentModel.Localizable(true) System.ComponentModel.Browsable(true) System.Windows.Forms.AutoSizeMode To be added. Controls that do not recognize the property will function as though was set to . All controls that recognize the property will, by default, grow to fit available space, but will not shrink below the value specified by the property. Gets or sets how the control will resize itself. Property 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always) System.ComponentModel.Browsable(true) System.Windows.Forms.AutoValidate To be added. To be added. Gets or sets how the control performs validation when the user changes focus to another control. Event 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always) System.ComponentModel.Browsable(true) System.EventHandler If your custom control performs any of its own validation, you will need to know when a developer using your control has changed the property so that you can change your control's validation behavior accordingly. Occurs when the property changes. Property 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always) System.ComponentModel.DefaultValue(System.Windows.Forms.BorderStyle.None) System.ComponentModel.Browsable(true) System.Windows.Forms.BorderStyle To be added. When the property is set to , the control has a sunken, three-dimensional appearance. To display a flat, thin border, set the property to . Gets or sets the border style of the user control. Property 1.0.5000.0 2.0.0.0 System.Windows.Forms.CreateParams To be added. To be added. To be added. Property System.Drawing.Size To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Event System.EventHandler You can use this event to perform tasks such as allocating resources used by the control. If the is part of an MDI child form, the event will occur each time the child form is shown. In this case, you should put any one-time initialization code in the instead of a event handler. The event occurs when the handle for the is created. In some circumstances, this can cause the event to occur more than one time. For example, the event occurs when the is loaded, and again if the handle is recreated. (One way that a handle is recreated is by calling the method.) To account for the event occurring more than one time, you should put any one time initialization code in the constructor instead of a event handler. In addition, you should not add data bindings to the in a event handler. For more information about handling events, see [<topic://cpconEventsOverview>]. Occurs before the control becomes visible for the first time. 1.0.5000.0 2.0.0.0 Method System.Void Raising an event invokes the event handler through a delegate. For more information, see [<topic://cpconProvidingEventFunctionality>]. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the CreateControl event. 1.0.5000.0 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) Method System.Void The event occurs after the control is created, but before the control becomes visible for the first time. Raising an event invokes the event handler through a delegate. For more information, see [<topic://cpconProvidingEventFunctionality>]. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. 1.0.5000.0 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) Method System.Void To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) Method System.Void To be added. To be added. To be added. 2.0.0.0 Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.Browsable(false) System.ComponentModel.Bindable(false) System.String To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler To be added. Raises the event. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always) System.ComponentModel.Browsable(true) System.Boolean To be added. To be added. To be added. Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always) System.ComponentModel.Browsable(true) System.Boolean To be added. To be added. To be added. To be added. Method System.Void To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)