KeyboardFocusChangedEventArgs Class

Definition

LostKeyboardFocusGotKeyboardFocus 路由事件以及相关的附加事件和预览事件提供数据。Provides data for LostKeyboardFocus and GotKeyboardFocus routed events, as well as related attached and Preview events.

public ref class KeyboardFocusChangedEventArgs : System::Windows::Input::KeyboardEventArgs
public class KeyboardFocusChangedEventArgs : System.Windows.Input.KeyboardEventArgs
type KeyboardFocusChangedEventArgs = class
    inherit KeyboardEventArgs
Public Class KeyboardFocusChangedEventArgs
Inherits KeyboardEventArgs
Inheritance

Remarks

此事件数据类与以下附加事件一起使用:This event data class is used with the following attached events:

此事件数据类还与基元素上的以下路由事件一起使用。This event data class is also used with the following routed events on base elements. 这些路由事件转发前面列出的附加事件,使其在 WPFWPF的常规元素模型中更易于访问。These routed events forward the previously listed attached events to make them more accessible to the general element model in WPFWPF.

附加事件和基本元素路由事件共享其事件数据,路由事件的冒泡和隧道版本也共享事件数据。The attached events and the base element routed events share their event data, and the bubbling and tunneling versions of the routed events also share event data. 这可能会影响事件在传输事件路由时的已处理特性。This can affect the handled characteristics of the event as it travels the event route. 有关详细信息,请参阅输入概述For details, see Input Overview.

如果处理 PreviewGotKeyboardFocus 事件或 PreviewLostKeyboardFocus 事件(Handled 设置为事件数据中的 true),键盘焦点将不会更改。If the PreviewGotKeyboardFocus event or the PreviewLostKeyboardFocus event is handled (Handled is set to true in the event data), keyboard focus will not change.

如果处理 PreviewGotKeyboardFocus 事件或 PreviewLostKeyboardFocus 事件,键盘焦点将不会更改。If the PreviewGotKeyboardFocus event or the PreviewLostKeyboardFocus event is handled, keyboard focus will not change.

Constructors

KeyboardFocusChangedEventArgs(KeyboardDevice, Int32, IInputElement, IInputElement)

初始化 KeyboardFocusChangedEventArgs 类的新实例。Initializes a new instance of the KeyboardFocusChangedEventArgs class.

Properties

Device

获取启动此事件的输入设备。Gets the input device that initiated this event.

(Inherited from InputEventArgs)
Handled

获取或设置一个值,该值指示针对路由事件(在其经过路由时)的事件处理的当前状态。Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.

(Inherited from RoutedEventArgs)
KeyboardDevice

获取与输入事件关联的键盘设备。Gets the keyboard device associated with the input event.

(Inherited from KeyboardEventArgs)
NewFocus

获取焦点已移动到的元素。Gets the element that focus has moved to.

OldFocus

获取以前具有焦点的元素。Gets the element that previously had focus.

OriginalSource

在父类进行任何可能的 Source 调整之前,获取由纯命中测试确定的原始报告源。Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.

(Inherited from RoutedEventArgs)
RoutedEvent

获取或设置与此 RoutedEventArgs 实例关联的 RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance.

(Inherited from RoutedEventArgs)
Source

获取或设置对引发事件的对象的引用。Gets or sets a reference to the object that raised the event.

(Inherited from RoutedEventArgs)
Timestamp

获取此事件发生时的时间。Gets the time when this event occurred.

(Inherited from InputEventArgs)

Methods

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
InvokeEventHandler(Delegate, Object)

以特定于类型的方式调用事件处理程序,这样做可以提高事件系统效率。Invokes event handlers in a type-specific way, which can increase event system efficiency.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
OnSetSource(Object)

在派生类中重写时,每当实例的 Source 属性的值发生更改,则提供一个通知回调入口点。When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.

(Inherited from RoutedEventArgs)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also