This documentation is archived and is not being maintained.

ListControlDesigner.Initialize Method

Initializes the designer with the specified component.

[Visual Basic]
Overrides Public Sub Initialize( _
   ByVal component As IComponent _
) Implements IDesigner.Initialize
[C#]
public override void Initialize(
 IComponent component
);
[C++]
public: void Initialize(
 IComponent* component
);
[JScript]
public override function Initialize(
   component : IComponent
);

Parameters

component
The IComponent for the designer.

Implements

IDesigner.Initialize

Remarks

This method is called to initialize the designer with the component to design.

Example

[Visual Basic] The following code example overrides the Initialize method to ensure that only instances of a custom class named SimpleRadioButtonList are used by the custom designer, named SimpleRadioButtonListDesigner.

[Visual Basic] This code example is part of a larger example provided for the ListControlDesigner class.

[Visual Basic] 
' Ensure that only a SampleList control can be created in this
' designer.
Public Overrides Sub Initialize(component As IComponent)
    Debug.Assert( _
        TypeOf component Is SimpleRadioButtonList, _
        "Invalid SimpleRadioButtonList Control initialized.")
      
    simpleRadioButtonList = CType(component, SimpleRadioButtonList)
    MyBase.Initialize(component)
End Sub 

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ListControlDesigner Class | ListControlDesigner Members | System.Web.UI.Design.WebControls Namespace | IDesigner

Show: