Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.23 KB

File metadata and controls

29 lines (20 loc) · 1.23 KB
-api-id -api-type
M:Windows.UI.Xaml.Controls.WebView.Focus(Windows.UI.Xaml.FocusState)
winrt method

Windows.UI.Xaml.Controls.WebView.Focus

-description

Sets the input focus to the WebView.

-parameters

-param value

A value that indicates how the focus was set.

-returns

true if focus was set; otherwise, false.

-remarks

In apps compiled for Windows 8, the WebView control automatically gets input focus whenever you use script to programmatically set the focus to some content in the WebView. In apps compiled for Windows 8.1, this does not occur automatically. Instead, you must call the Focus method to set the focus to the WebView control and also use script to set the focus to some content in the control.

When you call this method, you will typically pass in a FocusState value of Programmatic. Use the Pointer and Keyboard values when you call this method in response to direct user input. You cannot use this method to remove input focus from the control. The Unfocused value will throw an exception.

-examples

-see-also