IInputElement.GotMouseCapture Event

Definition

在元素捕获鼠标时发生。Occurs when the element captures the mouse.

public:
 event System::Windows::Input::MouseEventHandler ^ GotMouseCapture;
event System.Windows.Input.MouseEventHandler GotMouseCapture;
member this.GotMouseCapture : System.Windows.Input.MouseEventHandler 
Event GotMouseCapture As MouseEventHandler 

Remarks

此接口不用于公共实现。This interface is not intended for public implementation. 有关详细信息,请参阅 IInputElement 界面的 "备注"。For more information, see remarks for the IInputElement interface.

当元素捕获鼠标时,即使光标超出其边界,该元素也会接收鼠标输入。When an element captures the mouse, that element receives mouse input even if the cursor is outside its bounds. 通常,仅在拖放操作过程中以这种方式捕获鼠标,并保留捕获,直到拖放操作的删除操作发生。The mouse is typically captured in this manner only during drag-and-drop operations and retains capture until the drop action of the drag-and-drop operation occurs.

Applies to

See also