BehaviorService.PushCaptureBehavior Method

Pushes a Behavior onto the behavior stack and assigns mouse capture to the behavior.

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

public void PushCaptureBehavior(
	Behavior behavior
)

Parameters

behavior
Type: System.Windows.Forms.Design.Behavior.Behavior

The Behavior to push.

ExceptionCondition
ArgumentNullException

behavior is null.

Pushing a capture behavior is often done through a hit-tested Glyph. If a behavior calls the PushCaptureBehavior method and mouse capture is lost, the behavior's OnLoseCapture method is called.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft