ContentElement.LostMouseCapture ContentElement.LostMouseCapture ContentElement.LostMouseCapture ContentElement.LostMouseCapture Event


此元素失去滑鼠擷取時發生。Occurs when this element loses mouse capture.

 virtual event System::Windows::Input::MouseEventHandler ^ LostMouseCapture;
public event System.Windows.Input.MouseEventHandler LostMouseCapture;
member this.LostMouseCapture : System.Windows.Input.MouseEventHandler 
Public Custom Event LostMouseCapture As MouseEventHandler 



當項目捕捉到滑鼠時,它收到滑鼠輸入,即使在指標位於其範圍外。When an element captures the mouse, it receives mouse input even if the pointer is outside its bounds. 是通常只有在捕捉滑鼠拖放作業。The mouse is typically captured only during drag-and-drop operations.

因為此事件會使用事件反昇的路由,失去擷取的項目可能的子項目,而非項目實際附加事件處理常式。Because this event uses bubbling routing, the element that loses capture might be a child element instead of the element where the event handler is actually attached. 檢查Source事件資料來判斷實際遺失擷取的項目中。Check the Source in the event data to determine the actual element that lost capture.

此事件建立的別名Mouse.LostMouseCapture附加事件,此類別中,以便LostMouseCapture屬於類別的成員清單時ContentElement繼承為基底的項目。This event creates an alias for the Mouse.LostMouseCapture attached event for this class, so that LostMouseCapture is part of the class members list when ContentElement is inherited as a base element. 附加至事件處理常式LostMouseCapture事件會附加至基礎Mouse.LostMouseCapture附加事件,並接收相同的事件資料執行個體。Event handlers that are attached to the LostMouseCapture event are attached to the underlying Mouse.LostMouseCapture attached event and receive the same event data instance.

路由事件資訊Routed Event Information

識別項欄位Identifier field LostMouseCaptureEvent
路由策略Routing strategy 事件反昇Bubbling
Delegate - 委派Delegate MouseEventHandler
  • 沒有任何已定義的對應通道事件。There is no defined corresponding tunneling event.

  • 覆寫OnLostMouseCapture實作在衍生類別中這個事件的類別處理。Override OnLostMouseCapture to implement class handling for this event in derived classes.