Behavior 생성자

정의

Behavior 클래스의 새 인스턴스를 초기화합니다.

오버로드

Behavior()

Behavior 클래스의 새 인스턴스를 초기화합니다.

Behavior(Boolean, BehaviorService)

주어진 Behavior을 사용하여 BehaviorService 클래스의 새 인스턴스를 초기화합니다.

Behavior()

Behavior 클래스의 새 인스턴스를 초기화합니다.

protected:
 Behavior();
protected Behavior ();
Protected Sub New ()

예제

다음 코드 예제에서는 Behavior 클래스의 새 인스턴스를 초기화하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 BehaviorService 클래스입니다.

public:
    DemoGlyph(BehaviorService^ behavior, Control^ control):
      Glyph(gcnew BehaviorServiceSample::DemoBehavior)
      {
          this->behavior = behavior;
          this->control = control;
      }
public MyGlyph(BehaviorService behaviorSvc, Control control) : 
    base(new MyBehavior())
{
    this.behaviorSvc = behaviorSvc;
    this.control = control;
}
Public Sub New(ByVal behaviorSvc As _
    System.Windows.Forms.Design.Behavior.BehaviorService, _
    ByVal control As Control)

    MyBase.New(New MyBehavior())
    Me.behaviorSvc = behaviorSvc
    Me.control = control
End Sub

추가 정보

적용 대상

Behavior(Boolean, BehaviorService)

주어진 Behavior을 사용하여 BehaviorService 클래스의 새 인스턴스를 초기화합니다.

protected:
 Behavior(bool callParentBehavior, System::Windows::Forms::Design::Behavior::BehaviorService ^ behaviorService);
protected Behavior (bool callParentBehavior, System.Windows.Forms.Design.Behavior.BehaviorService behaviorService);
protected Behavior (bool callParentBehavior, System.Windows.Forms.Design.Behavior.BehaviorService? behaviorService);
new System.Windows.Forms.Design.Behavior.Behavior : bool * System.Windows.Forms.Design.Behavior.BehaviorService -> System.Windows.Forms.Design.Behavior.Behavior
Protected Sub New (callParentBehavior As Boolean, behaviorService As BehaviorService)

매개 변수

callParentBehavior
Boolean

부모 동작이 있는 경우에 그 동작을 호출해야 하면 true이고, 그렇지 않으면 false입니다.

behaviorService
BehaviorService

사용할 BehaviorService입니다.

예외

callParentBehaviortrue이고 behaviorServicenull인 경우

설명

부모 동작은 에서 유지 관리하는 동작 스택의 다음 동작입니다 BehaviorService. 매개 변수가 인 callParentBehavior 경우 매개 변수는 이 behaviorService 아니어야 nulltrue합니다.

callParentBehavior 는 기본 Behavior 클래스가 부모 동작을 호출해야 하는지 여부를 나타냅니다. 그런 다음 에서 올바른 부모 동작을 선택하도록 허용 BehaviorService 합니다.

적용 대상