XamlSourceFocusNavigationRequest Constructors

Definition

Overloads

XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason)

Initializes a new instance of the XamlSourceFocusNavigationRequest class with the reason for the navigation request.

XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason, Rect)

Initializes a new instance of the XamlSourceFocusNavigationRequest class with the reason for the navigation request and the bounding rectangle that will receive navigation focus.

XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason, Rect, Guid)

Initializes a new instance of the XamlSourceFocusNavigationRequest class with the reason for the navigation request, the bounding rectangle that will receive navigation focus, and the unique correlation ID for the request.

XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason)

Initializes a new instance of the XamlSourceFocusNavigationRequest class with the reason for the navigation request.

public:
 XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason);
 XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason const& reason);
public XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason);
function XamlSourceFocusNavigationRequest(reason)
Public Sub New (reason As XamlSourceFocusNavigationReason)

Parameters

reason
XamlSourceFocusNavigationReason

A value that indicates the reason for the navigation request.

Applies to

XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason, Rect)

Initializes a new instance of the XamlSourceFocusNavigationRequest class with the reason for the navigation request and the bounding rectangle that will receive navigation focus.

public:
 XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason, Rect hintRect);
 XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason const& reason, Rect const& hintRect);
public XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason, Rect hintRect);
function XamlSourceFocusNavigationRequest(reason, hintRect)
Public Sub New (reason As XamlSourceFocusNavigationReason, hintRect As Rect)

Parameters

reason
XamlSourceFocusNavigationReason

A value that indicates the reason for the navigation request.

hintRect
Rect

The bounding rectangle of the element in the desktop application that is losing focus (that is, the element that had focus before the DesktopWindowXamlSource received focus). This parameter is used to provide context to the UWP XAML framework when the user enters the DesktopWindowXamlSource by using a 4-direction navigation experience (for example, by using keyboard arrow keys). For more information, see the remarks.

Remarks

The hintRect parameter is used to provide context to the UWP XAML framework when the user enters the DesktopWindowXamlSource by using a 4-direction navigation experience (for example, by using keyboard arrow keys) with Reason values of Left, Right, Top, or Down. For example, suppose that to the left of the DesktopWindowXamlSource are three WPF buttons and inside the DesktopWindowXamlSource are three UWP buttons, so in total there is a 3x2 grid of buttons across two UI frameworks. When the user presses the right arrow on the keyboard from the middle WPF button, you want focus to move to the middle UWP button in the DesktopWindowXamlSource. To accomplish this, pass the bounding rectangle of the middle WPF button to the hintRect parameter and specify Right for the reason parameter.

Applies to

XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason, Rect, Guid)

Initializes a new instance of the XamlSourceFocusNavigationRequest class with the reason for the navigation request, the bounding rectangle that will receive navigation focus, and the unique correlation ID for the request.

public:
 XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason, Rect hintRect, Platform::Guid correlationId);
 XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason const& reason, Rect const& hintRect, winrt::guid const& correlationId);
public XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason, Rect hintRect, Guid correlationId);
function XamlSourceFocusNavigationRequest(reason, hintRect, correlationId)
Public Sub New (reason As XamlSourceFocusNavigationReason, hintRect As Rect, correlationId As Guid)

Parameters

reason
XamlSourceFocusNavigationReason

A value that indicates the reason for the navigation request.

hintRect
Rect

The bounding rectangle of the element in the desktop application that is losing focus (that is, the element that had focus before the DesktopWindowXamlSource received focus). This parameter is used to provide context to the UWP XAML framework when the user enters the DesktopWindowXamlSource by using a 4-direction navigation experience (for example, by using keyboard arrow keys). For more information, see the remarks.

correlationId
Guid

Platform::Guid

winrt::guid

The unique identifier for the navigation request. You can use this parameter for logging purposes, or if you have an existing correlation ID from an in-progress focus movement already in progress and you want to connect that focus movement with the current navigation request.

Remarks

The hintRect parameter is used to provide context to the UWP XAML framework when the user enters the DesktopWindowXamlSource by using a 4-direction navigation experience (for example, by using keyboard arrow keys) with Reason values of Left, Right, Top, or Down. For example, suppose that to the left of the DesktopWindowXamlSource are three WPF buttons and inside the DesktopWindowXamlSource are three UWP buttons, so in total there is a 3x2 grid of buttons across two UI frameworks. When the user presses the right arrow on the keyboard from the middle WPF button, you want focus to move to the middle UWP button in the DesktopWindowXamlSource. To accomplish this, pass the bounding rectangle of the middle WPF button to the hintRect parameter and specify Right for the reason parameter.

Applies to