XamlSourceFocusNavigationRequest Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason) |
Initializes a new instance of a XamlSourceFocusNavigationRequest object for the the specified navigation request reason. |
XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason, Rect) |
Initializes a new instance of a XamlSourceFocusNavigationRequest object for the the specified navigation request reason 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. Initializes a new instance of a XamlSourceFocusNavigationRequest object for the the specified navigation request reason, the bounding rectangle that will receive navigation focus, and the unique correlation ID for the request. |
XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason)
Initializes a new instance of a XamlSourceFocusNavigationRequest object for the the specified navigation request reason.
public:
XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason);
XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason const& reason);
public XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason reason);
function XamlSourceFocusNavigationRequest(reason)
Public Sub New (reason As XamlSourceFocusNavigationReason)
Parameters
The reason for the navigation request.
Applies to
XamlSourceFocusNavigationRequest(XamlSourceFocusNavigationReason, Rect)
Initializes a new instance of a XamlSourceFocusNavigationRequest object for the the specified navigation request reason 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
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 WinUI XAML framework when the user enters the DesktopWindowXamlSource using a 4-direction navigation experience, such as the keyboard arrow keys.
Remarks
An example use case for this object is where there are three WPF buttons to the left of the DesktopWindowXamlSource and there are three WinUI buttons inside the DesktopWindowXamlSource (a total of six buttons in a 3x2 grid across two UI frameworks). When the user presses the right arrow on the keyboard from the middle WPF button, focus should move to the middle WinUI 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.
Initializes a new instance of a XamlSourceFocusNavigationRequest object for the the specified navigation request reason, 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
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 WinUI XAML framework when the user enters the DesktopWindowXamlSource using a 4-direction navigation experience, such as the keyboard arrow keys.
- 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
An example use case for this object is where there are three WPF buttons to the left of the DesktopWindowXamlSource and there are three WinUI buttons inside the DesktopWindowXamlSource (a total of six buttons in a 3x2 grid across two UI frameworks). When the user presses the right arrow on the keyboard from the middle WPF button, focus should move to the middle WinUI 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.