Behavior Constructeurs
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la classe Behavior.
Surcharges
| Nom | Description |
|---|---|
| Behavior() |
Initialise une nouvelle instance de la classe Behavior. |
| Behavior(Boolean, BehaviorService) |
Initialise une nouvelle instance de la Behavior classe avec la valeur donnée BehaviorService. |
Behavior()
- Source:
- Behavior.cs
- Source:
- Behavior.cs
- Source:
- Behavior.cs
- Source:
- Behavior.cs
- Source:
- Behavior.cs
Initialise une nouvelle instance de la classe Behavior.
protected:
Behavior();
protected Behavior();
Protected Sub New ()
Exemples
L’exemple de code suivant montre comment initialiser une nouvelle instance de la Behavior classe. Cet exemple de code fait partie d’un exemple plus grand fourni pour la BehaviorService classe.
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
Voir aussi
S’applique à
Behavior(Boolean, BehaviorService)
- Source:
- Behavior.cs
- Source:
- Behavior.cs
- Source:
- Behavior.cs
- Source:
- Behavior.cs
- Source:
- Behavior.cs
Initialise une nouvelle instance de la Behavior classe avec la valeur donnée 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)
Paramètres
- callParentBehavior
- Boolean
true si le comportement parent doit être appelé s’il existe ; sinon, false.
- behaviorService
- BehaviorService
BehaviorService à utiliser.
Exceptions
callParentBehavior est true, et behaviorService est null.
Remarques
Le comportement parent est le comportement suivant sur la pile de comportements maintenue par le BehaviorService. Si le callParentBehavior paramètre est true, le behaviorService paramètre ne doit pas être null.
callParentBehavior indique si la classe de base Behavior doit appeler le comportement parent, puis autoriser le BehaviorService comportement parent approprié.