Behavior.OnLoseCapture(Glyph, EventArgs) 方法

定义

在丢失鼠标捕获时由装饰器窗口调用。

public:
 virtual void OnLoseCapture(System::Windows::Forms::Design::Behavior::Glyph ^ g, EventArgs ^ e);
public virtual void OnLoseCapture (System.Windows.Forms.Design.Behavior.Glyph g, EventArgs e);
public virtual void OnLoseCapture (System.Windows.Forms.Design.Behavior.Glyph? g, EventArgs e);
abstract member OnLoseCapture : System.Windows.Forms.Design.Behavior.Glyph * EventArgs -> unit
override this.OnLoseCapture : System.Windows.Forms.Design.Behavior.Glyph * EventArgs -> unit
Public Overridable Sub OnLoseCapture (g As Glyph, e As EventArgs)

参数

g
Glyph

一个 Glyph,拖放行为对其调用。

e
EventArgs

包含事件数据的 EventArgs

注解

行为可以通过通过行为服务请求鼠标捕获,方法是使用 PushCaptureBehavior 该方法将自身推送到行为堆栈。 如果这样做,则会在捕获丢失时通过 OnLoseCapture 方法通知它。 通常,此行为此时会从堆栈中删除自身。 发生以下操作之一时,捕获将丢失:

  • 其他人请求捕获。

  • 推送另一种行为。

  • 删除此行为。

在这些情况下, OnLoseCapture 将调用该行为。

适用于

另请参阅