This documentation is archived and is not being maintained.

Behavior Constructor (Boolean, BehaviorService)

Note: This constructor is new in the .NET Framework version 2.0.

Initializes a new instance of the Behavior class with the given BehaviorService.

Namespace: System.Windows.Forms.Design.Behavior
Assembly: System.Design (in system.design.dll)

protected Behavior (
	bool callParentBehavior,
	BehaviorService behaviorService
)
protected Behavior (
	boolean callParentBehavior, 
	BehaviorService behaviorService
)
protected function Behavior (
	callParentBehavior : boolean, 
	behaviorService : BehaviorService
)

Parameters

callParentBehavior

true if the parent behavior should be called if it exists; otherwise, false.

behaviorService

The BehaviorService to use.

Exception typeCondition

ArgumentNullException

callParentBehavior is true, and behaviorService is a null reference (Nothing in Visual Basic).

The parent behavior is the next behavior on the behavior stack maintained by the BehaviorService. If the callParentBehavior parameter is true, then the behaviorService parameter must not be a null reference (Nothing in Visual Basic).

callParentBehavior indicates whether the base Behavior class should call the parent behavior, and then allow the BehaviorService select the correct parent behavior.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: