Language

Behavior コンストラクター

定義

Behavior クラスの新しいインスタンスを初期化します。

オーバーロード

名前 説明
Behavior()

Behavior クラスの新しいインスタンスを初期化します。

Behavior(Boolean, BehaviorService)

指定したBehaviorを使用して、BehaviorService クラスの新しいインスタンスを初期化します。

Behavior()

ソース:
Behavior.cs
ソース:
Behavior.cs
ソース:
Behavior.cs
ソース:
Behavior.cs
ソース:
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)

ソース:
Behavior.cs
ソース:
Behavior.cs
ソース:
Behavior.cs
ソース:
Behavior.cs
ソース:
Behavior.cs

指定した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 。

例外

callParentBehavior は trueです、behaviorService は nullです。

注釈

親の動作は、 BehaviorServiceによって維持される動作スタックの次の動作です。 callParentBehavior パラメーターがtrueされている場合、behaviorService パラメーターをnullすることはできません。

callParentBehavior は、基本 Behavior クラスが親の動作を呼び出す必要があるかどうかを示し、 BehaviorService が正しい親の動作を選択できるようにします。

適用対象