UIElement.GotStylusCapture 事件


此元素擷取手寫筆時發生。Occurs when this element captures the stylus.

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





當專案捕捉到手寫筆時,即使指標超出其界限,也會接收手寫筆輸入。When an element captures the stylus, it receives stylus input even if the pointer is outside its bounds. 手寫筆通常只會在拖放作業期間捕捉,並保留 capture,直到拖放作業的卸載動作發生為止。The stylus is typically captured only during drag-and-drop operations and retains capture until the drop action of the drag-and-drop operation occurs.

因為此事件使用反升路由,所以具有 capture 的元素可能是子項目,而不是實際附加事件處理常式的專案。Because this event uses bubbling routing, the element that has capture might be a child element instead of the element where the event handler is actually attached. 檢查 Source 事件資料中的,以判斷具有 capture 的實際元素。Check the Source in the event data to determine the actual element that has capture.

此事件會為這個類別建立附加事件的別名, GotStylusCaptureUIElement 繼承為基底專案時,它就是類別成員清單的一部分。This event creates an alias for the attached event for this class so that GotStylusCapture is part of the class members list when UIElement is inherited as a base element. 附加至事件的事件處理常式 GotStylusCapture 會附加至基礎 Stylus.GotStylusCapture 附加事件,並接收相同的事件資料實例。Event handlers that are attached to the GotStylusCapture event are attached to the underlying Stylus.GotStylusCapture attached event and receive the same event data instance.

路由事件資訊Routed Event Information

識別碼欄位Identifier field GotStylusCaptureEvent
路由策略Routing strategy 鼓 泡Bubbling
代理人Delegate StylusEventHandler
  • 沒有已定義的對應通道事件。There is no defined corresponding tunneling event.

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