Compartir a través de


CoreWebView2Controller.MoveFocus(CoreWebView2MoveFocusReason) Method

Definition

Moves focus into WebView.

public void MoveFocus (Microsoft.Web.WebView2.Core.CoreWebView2MoveFocusReason reason);
member this.MoveFocus : Microsoft.Web.WebView2.Core.CoreWebView2MoveFocusReason -> unit
Public Sub MoveFocus (reason As CoreWebView2MoveFocusReason)

Parameters

reason
CoreWebView2MoveFocusReason

The reason for moving focus.

Remarks

WebView will get focus and focus will be set to correspondent element in the page hosted in the WebView. For Programmatic reason, focus is set to previously focused element or the default element if no previously focused element exists. For Next reason, focus is set to the first element. For Previous reason, focus is set to the last element. WebView changes focus through user interaction including selecting into a WebView or Tab into it. For tabbing, the app runs MoveFocus with Next or Previous to align with Tab and Shift+Tab respectively when it decides the WebView is the next tabbable element.

Applies to