XamlSourceFocusNavigationReason Enum

Definition

Defines values that represent the reasons that the Windows.UI.Xaml.UIElement got focus in a desktop application that uses a DesktopWindowXamlSource object to host XAML-based UI. The XamlSourceFocusNavigationRequest.Reason property returns one of these values.

public enum class XamlSourceFocusNavigationReason
/// [Windows.Foundation.Metadata.ContractVersion(Windows.UI.Xaml.Hosting.HostingContract, 196608)]
enum class XamlSourceFocusNavigationReason
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.UI.Xaml.Hosting.HostingContract), 196608)]
public enum XamlSourceFocusNavigationReason
Public Enum XamlSourceFocusNavigationReason
Inheritance
XamlSourceFocusNavigationReason
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.17763.0)
API contract
Windows.UI.Xaml.Hosting.HostingContract (introduced in v3.0)

Fields

Down 10

The focus was set in response to the user navigating down by using a 4-direction navigation experience (for example, by using keyboard arrow keys).

First 3

The focus was set in response to the user navigating to the next element by using a bidirectional navigation experience (for example, by pressing Tab).

Last 4

The focus was set in response to the user navigating to the previous element by using a bidirectional navigation experience (for example, by pressing Shift-Tab).

Left 7

The focus was set in response to the user navigating left by using a 4-direction navigation experience (for example, by using keyboard arrow keys).

Programmatic 0

The focus was set programmatically.

Restore 1

The focus was restored after a task switch, such as pressing Alt + Tab.

Right 9

The focus was set in response to the user navigating right by using a 4-direction navigation experience (for example, by using keyboard arrow keys).

Up 8

The focus was set in response to the user navigating up by using a 4-direction navigation experience (for example, by using keyboard arrow keys).

Applies to