ListControlDesigner.Initialize(IComponent) 메서드

정의

연결된 컨트롤을 보고 편집하고 디자인할 디자이너를 준비합니다.

public:
 override void Initialize(System::ComponentModel::IComponent ^ component);
public override void Initialize(System.ComponentModel.IComponent component);
override this.Initialize : System.ComponentModel.IComponent -> unit
Public Overrides Sub Initialize (component As IComponent)

매개 변수

component
IComponent

를 구현하는 ListControl 컨트롤에서 파생된 컨트롤입니다 IComponent.

예제

다음 코드 예제에서는 명명 Initialize 된 컨트롤 클래스의 인스턴스만 사용자 지정 디자이너에서 사용 되도록 클래스에서 ListControlDesigner 파생 된 디자이너의 메서드를 재정 SimpleRadioButtonList 의 합니다.

이 코드 예제는 클래스에 제공된 더 큰 예제의 ListControlDesigner 일부입니다.

public override void Initialize(IComponent component)
{
    // Ensure that only a SimpleRadioButtonList can be 
    // created in this designer.
    Debug.Assert( 
        component is SimpleRadioButtonList, 
        "An invalid SimpleRadioButtonList control was initialized.");

    simpleRadioButtonList = (SimpleRadioButtonList)component;
    base.Initialize(component);
} // Initialize
Public Overrides Sub Initialize(ByVal component As IComponent)

    ' Ensure that only a SimpleRadioButtonList can be created 
    ' in this designer.
    Debug.Assert( _
        TypeOf component Is SimpleRadioButtonList, _
        "An invalid SimpleRadioButtonList control was initialized.")

    simpleRadioButtonList = CType(component, SimpleRadioButtonList)
    MyBase.Initialize(component)
End Sub

설명

디자이너 호스트는 디자이너를 Initialize 사용하여 클래스에서 파생된 컨트롤을 렌더링할 준비가 되면 메서드를 ListControl 호출합니다. 메서드와 해당 기본 메서드는 Initialize 속성을 구성하고 디자이너 작업에 필요한 이벤트에 연결합니다.

매개 변수는 component 이 디자이너와 연결되었거나 해당 컨트롤의 복사본인 컨트롤에서 ListControl파생된 컨트롤입니다.

적용 대상

추가 정보