ContentElement.PreviewMouseUp 事件

定义

在鼠标指针位于此元素上并且松开任意鼠标按钮时发生。Occurs when any mouse button is released while the mouse pointer is over this element.

public:
 event System::Windows::Input::MouseButtonEventHandler ^ PreviewMouseUp;
public event System.Windows.Input.MouseButtonEventHandler PreviewMouseUp;
member this.PreviewMouseUp : System.Windows.Input.MouseButtonEventHandler 
Public Custom Event PreviewMouseUp As MouseButtonEventHandler 

事件类型

MouseButtonEventHandler

注解

此事件将为 Mouse.PreviewMouseUp 此类创建附加事件的别名,因此 PreviewMouseUpContentElement 继承为基元素时,它是类成员列表的一部分。This event creates an alias for the Mouse.PreviewMouseUp attached event for this class, so that PreviewMouseUp is part of the class members list when ContentElement is inherited as a base element. 附加到事件的事件处理程序 PreviewMouseUp 附加到基础 Mouse.PreviewMouseUp 附加事件,并接收相同的事件数据实例。Event handlers that are attached to the PreviewMouseUp event are attached to the underlying Mouse.PreviewMouseUp attached event and receive the same event data instance.

PreviewMouseUp事件通常与或一起引发 PreviewMouseLeftButtonUp PreviewMouseRightButtonUp ,这对应于按下这两个标准鼠标按钮之一。The PreviewMouseUp event is often raised together with either PreviewMouseLeftButtonUp or PreviewMouseRightButtonUp, which correspond to a press of one of the two standard mouse buttons. PreviewMouseLeftButtonUpPreviewMouseRightButtonUp 也是路由事件,但它们是直接路由事件,当 Mouse.PreviewMouseUp 事件沿事件路由到达此元素时,将引发相应的按钮特定的事件。PreviewMouseLeftButtonUp and PreviewMouseRightButtonUp are also routed events, but they are direct routed events, and the appropriate button-specific event is raised when the Mouse.PreviewMouseUp event reaches this element along the event route. 请参阅或的 "备注" PreviewMouseLeftButtonUp PreviewMouseRightButtonUpSee Remarks for PreviewMouseLeftButtonUp or PreviewMouseRightButtonUp.

路由事件信息Routed Event Information

标识符字段Identifier field PreviewMouseUpEvent
路由策略Routing strategy 隧道Tunneling
委托Delegate MouseButtonEventHandler
  • 对应的冒泡事件为 MouseUpThe corresponding bubbling event is MouseUp.

  • 重写 OnPreviewMouseUp 以在派生类中实现此事件的类处理。Override OnPreviewMouseUp to implement class handling for this event in derived classes.

适用于