ContentElement.GotStylusCapture ContentElement.GotStylusCapture ContentElement.GotStylusCapture ContentElement.GotStylusCapture Event


此元素擷取手寫筆時發生。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. 手寫筆通常只會在拖放作業期間擷取,並且保持擷取,直到拖放作業的拖放動作發生為止。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.

此事件會使用事件反昇的路由,因為已擷取的項目可能的子項目,而非項目實際附加事件處理常式。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事件資料來判斷已擷取的實際項目中。Check the Source in the event data to determine the actual element that has capture.

此事件會建立這個類別的附加事件的別名,讓GotStylusCapture屬於類別的成員清單時ContentElement繼承為基底的項目。This event creates an alias for the attached event for this class so that GotStylusCapture is part of the class members list when ContentElement 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 - 委派Delegate StylusEventHandler
  • 沒有任何已定義的對應通道事件。There is no defined corresponding tunneling event.

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