UIElement.GotStylusCapture UIElement.GotStylusCapture UIElement.GotStylusCapture UIElement.GotStylusCapture Event

定义

在此元素捕获触笔时发生。Occurs when this element captures the stylus.

public:
 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继承为基元素时UIElement , 它是类成员列表的一部分。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.

适用于