GettingFocusEventArgs class

[This documentation is preliminary and is subject to change.]

Provides event data for the GettingFocus event.

Inheritance

Object

RoutedEventArgs

GettingFocusEventArgs

Syntax

public class GettingFocusEventArgs : RoutedEventArgs
Public Class GettingFocusEventArgs
    Inherits RoutedEventArgs
public ref class GettingFocusEventArgs : RoutedEventArgs

Attributes

[MarshalingBehavior(Agile)]

[Threading(Both)]

[Version]

[WebHostHidden()]

Members

The GettingFocusEventArgs class has these types of members:

  • Properties

Properties

The GettingFocusEventArgs class has these properties.

Property Access type Description

Cancel

Read/write Gets or sets whether focus change is reverted.

NavigationDirection

Read-only Gets the focus change direction.

NewFocusedElement

Read/write Gets the element to receive focus if Cancel is not set to true.

OldFocusedElement

Read-only Gets the element to lose focus if Cancel is not set to true.

 

Remarks

GettingFocus is a routed event. For more info on routed events, see Events and routed events overview.

LosingFocus always fires before a corresponding GettingFocus event.

Set LosingFocusEventArgs.Cancel or GettingFocusEventArgs.Cancel to true to revert focus change.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Input Windows::UI::Xaml::Input [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

See also

Object

RoutedEventArgs

GettingFocus