Behavior 생성자

정의

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

오버로드

Name Description
Behavior()

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

Behavior(Boolean, BehaviorService)

지정된 BehaviorService클래스를 사용하여 클래스의 새 인스턴스를 Behavior 초기화합니다.

Behavior()

Source:
Behavior.cs
Source:
Behavior.cs
Source:
Behavior.cs
Source:
Behavior.cs
Source:
Behavior.cs

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)

Source:
Behavior.cs
Source:
Behavior.cs
Source:
Behavior.cs
Source:
Behavior.cs
Source:
Behavior.cs

지정된 BehaviorService클래스를 사용하여 클래스의 새 인스턴스를 Behavior 초기화합니다.

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. 매개 변수인 callParentBehaviortrue경우 매개 변수는 . behaviorService 이어야 null합니다.

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

적용 대상