ISupportInitialize 인터페이스

정의

이 개체가 일괄 초기화에 대 한 단순 트 랜 잭 트 알림을 지원 하는지 지정 합니다.Specifies that this object supports a simple, transacted notification for batch initialization.

public interface class ISupportInitialize
public interface ISupportInitialize
type ISupportInitialize = interface
Public Interface ISupportInitialize
파생

예제

다음 코드 예제에서는 ISupportInitialize 인터페이스를 사용 하 여 세 개의 TrackBar 컨트롤을 초기화 하는 방법을 보여 줍니다.The following code example demonstrates how to use the ISupportInitialize interface to initialize three TrackBar controls.

(dynamic_cast<System::ComponentModel::ISupportInitialize^>(this->trackBar1))->BeginInit();
(dynamic_cast<System::ComponentModel::ISupportInitialize^>(this->trackBar2))->BeginInit();
(dynamic_cast<System::ComponentModel::ISupportInitialize^>(this->trackBar3))->BeginInit();
this->SuspendLayout();

// 
// trackBar1
// 
this->trackBar1->Location = System::Drawing::Point( 160, 400 );
this->trackBar1->Name = "trackBar1";
this->trackBar1->TabIndex = 1;
this->trackBar1->Scroll += gcnew System::EventHandler( this, &Form1::trackBar_Scroll );

// 
// trackBar2
// 
this->trackBar2->Location = System::Drawing::Point( 608, 40 );
this->trackBar2->Name = "trackBar2";
this->trackBar2->TabIndex = 2;
this->trackBar2->Scroll += gcnew System::EventHandler( this, &Form1::trackBar_Scroll );

// 
// trackBar3
// 
this->trackBar3->Location = System::Drawing::Point( 56, 40 );
this->trackBar3->Name = "trackBar3";
this->trackBar3->TabIndex = 3;
this->trackBar3->Scroll += gcnew System::EventHandler( this, &Form1::trackBar_Scroll );
(dynamic_cast<System::ComponentModel::ISupportInitialize^>(this->trackBar1))->EndInit();
(dynamic_cast<System::ComponentModel::ISupportInitialize^>(this->trackBar2))->EndInit();
(dynamic_cast<System::ComponentModel::ISupportInitialize^>(this->trackBar3))->EndInit();

((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar3)).BeginInit();
this.SuspendLayout();
// 
// trackBar1
// 
this.trackBar1.Location = new System.Drawing.Point(160, 400);
this.trackBar1.Name = "trackBar1";
this.trackBar1.TabIndex = 1;
this.trackBar1.Scroll += new System.EventHandler(this.trackBar_Scroll);
// 
// trackBar2
// 
this.trackBar2.Location = new System.Drawing.Point(608, 40);
this.trackBar2.Name = "trackBar2";
this.trackBar2.TabIndex = 2;
this.trackBar2.Scroll += new System.EventHandler(this.trackBar_Scroll);
// 
// trackBar3
// 
this.trackBar3.Location = new System.Drawing.Point(56, 40);
this.trackBar3.Name = "trackBar3";
this.trackBar3.TabIndex = 3;
this.trackBar3.Scroll += new System.EventHandler(this.trackBar_Scroll);
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar3)).EndInit();
CType(Me.trackBar1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.trackBar2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.trackBar3, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'trackBar1
'
Me.trackBar1.Location = New System.Drawing.Point(160, 400)
Me.trackBar1.Name = "trackBar1"
Me.trackBar1.TabIndex = 1
'
'trackBar2
'
Me.trackBar2.Location = New System.Drawing.Point(608, 40)
Me.trackBar2.Name = "trackBar2"
Me.trackBar2.TabIndex = 2
'
'trackBar3
'
Me.trackBar3.Location = New System.Drawing.Point(56, 40)
Me.trackBar3.Name = "trackBar3"
Me.trackBar3.TabIndex = 3
CType(Me.trackBar1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.trackBar2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.trackBar3, System.ComponentModel.ISupportInitialize).EndInit()

설명

ISupportInitialize를 사용 하면 컨트롤이 여러 속성 할당을 최적화할 수 있습니다.ISupportInitialize allows controls to optimize multiple property assignments. 결과적으로, 상호 종속적인 속성을 초기화할 수 있습니다 또는 일괄 처리는 디자인 타임에 여러 속성을 설정 합니다.As a result, you can initialize co-dependent properties or batch set multiple properties at design time.

BeginInit 메서드를 호출 하 여 초기화가 시작 됨을 개체에 알립니다.Call the BeginInit method to signal the object that initialization is starting. EndInit 메서드를 호출 하 여 초기화가 완료 되었음을 알립니다.Call the EndInit method to signal that initialization is complete.

메서드

BeginInit()

초기화가 시작됨을 개체에 알립니다.Signals the object that initialization is starting.

EndInit()

초기화가 완료되었음을 개체에 알립니다.Signals the object that initialization is complete.

적용 대상

추가 정보