Udostępnij za pośrednictwem


WebView.XYFocusRight Property

Definition

Gets or sets the object that gets focus when a user presses the Directional Pad (D-pad) right.

public:
 property DependencyObject ^ XYFocusRight { DependencyObject ^ get(); void set(DependencyObject ^ value); };
DependencyObject XYFocusRight();

void XYFocusRight(DependencyObject value);
public DependencyObject XYFocusRight { get; set; }
var dependencyObject = webView.xYFocusRight;
webView.xYFocusRight = dependencyObject;
Public Property XYFocusRight As DependencyObject
<WebView XYFocusRight="{x:Bind dependencyObjectValue}"/>

Property Value

The object that gets focus when a user presses the Directional Pad (D-pad).

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

XYFocusRight is supported only on the Xbox device family, and only when using a game pad or remote control. The property is ignored otherwise.

For more info about this property, see the XY focus navigation and interaction section of the Designing for Xbox and TV article.

Version compatibility

The XYFocusRight property is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.

To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.

if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.WebView", "XYFocusRight"))
{
    webViewA.XYFocusRight = button1;
}

Applies to