KeyboardFocusChangedEventArgs Class


Provides data for UIElement.LostKeyboardFocus and UIElement.GotKeyboardFocus , as well as related attached and Preview events.GTMT

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)


type KeyboardFocusChangedEventArgs = 
        inherit KeyboardEventArgs

System_CAPS_pubmethodKeyboardFocusChangedEventArgs(KeyboardDevice, Int32, IInputElement, IInputElement)

Initializes a new instance of the KeyboardFocusChangedEventArgs class.


Gets the input device that initiated this event.(Inherited from InputEventArgs.)


Gets or sets a value that indicates the present state of the event handling for a as it travels the route. (Inherited from RoutedEventArgs.)GTMT


Gets the keyboard device associated with the input event. (Inherited from KeyboardEventArgs.)


Gets the element that focus has moved to.


Gets the element that previously had focus.


Gets the original reporting source as determined by pure , before any possible Source adjustment by a parent class.(Inherited from RoutedEventArgs.)GTMT


Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. (Inherited from RoutedEventArgs.)


Gets or sets a reference to the object that raised the event. (Inherited from RoutedEventArgs.)


Gets the time when this event occurred. (Inherited from InputEventArgs.)


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodInvokeEventHandler(Delegate, Object)

Invokes event handlers in a type-specific way, which can increase event system efficiency.(Overrides KeyboardEventArgs.InvokeEventHandler(Delegate, Object).)


Creates a shallow copy of the current Object.(Inherited from Object.)


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.)


Returns a string that represents the current object.(Inherited from Object.)

This event data class is used with the following :GTMT

This event data class is also used with the following on base elements. These forward the previously listed attached events to make them more accessible to the general element model in WPF.GTMTGTMT

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.

If the PreviewGotKeyboardFocus event or the PreviewLostKeyboardFocus event is handled (Handled is set to true in the event data), keyboard focus will not change.

If the PreviewGotKeyboardFocus event or the PreviewLostKeyboardFocus event is handled, keyboard focus will not change.

Legacy Code Example

Code snippet is not found. Confirm that the code snippet name 'HOWDOI' is correct.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft