UIElement.KeyUp 事件


当焦点在该元素上时松开某个键后发生。Occurs when a key is released while focus is on this element.

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



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

路由事件信息Routed Event Information

标识符字段Identifier field KeyUpEvent
路由策略Routing strategy 冒泡Bubbling
委托Delegate KeyEventHandler
  • 对应的隧道事件为 PreviewKeyUpThe corresponding tunneling event is PreviewKeyUp.

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