KeyboardFocusChangedEventArgs Class

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

System.Object
  System.EventArgs
    System.Windows.RoutedEventArgs
      System.Windows.Input.InputEventArgs
        System.Windows.Input.KeyboardEventArgs
          System.Windows.Input.KeyboardFocusChangedEventArgs

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

type KeyboardFocusChangedEventArgs =  
    class 
        inherit KeyboardEventArgs 
    end

The KeyboardFocusChangedEventArgs type exposes the following members.

  NameDescription
Public methodKeyboardFocusChangedEventArgsInitializes a new instance of the KeyboardFocusChangedEventArgs class.
Top

  NameDescription
Public propertyDeviceGets the input device that initiated this event. (Inherited from InputEventArgs.)
Public propertyHandledGets 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.)
Public propertyKeyboardDeviceGets the keyboard device associated with the input event. (Inherited from KeyboardEventArgs.)
Public propertyNewFocusGets the element that focus has moved to.
Public propertyOldFocusGets the element that previously had focus.
Public propertyOriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. (Inherited from RoutedEventArgs.)
Public propertyRoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. (Inherited from RoutedEventArgs.)
Public propertySourceGets or sets a reference to the object that raised the event. (Inherited from RoutedEventArgs.)
Public propertyTimestampGets the time when this event occurred. (Inherited from InputEventArgs.)
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInvokeEventHandlerInvokes event handlers in a type-specific way, which can increase event system efficiency. (Overrides KeyboardEventArgs.InvokeEventHandler(Delegate, Object).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnSetSourceWhen 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.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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. These routed events forward the previously listed attached events to make them more accessible to the general element model in WPF.

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft