XamlSourceFocusNavigationReason XamlSourceFocusNavigationReason XamlSourceFocusNavigationReason 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
enum class winrt::Windows::UI::Xaml::Hosting::XamlSourceFocusNavigationReason : int32_t
public enum XamlSourceFocusNavigationReason
Public Enum XamlSourceFocusNavigationReason
Attributes

Windows 10 requirements

Device family
Windows Desktop Extension SDK (introduced v10.0.17763.0)
API contract
Windows.UI.Xaml.Hosting.HostingContract (introduced v3)

Fields

Down Down Down 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 First First 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 Last Last 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 Left Left 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 Programmatic Programmatic Programmatic 0

The focus was set programmatically.

Restore Restore Restore Restore 1

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

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