Share via


IWebViewControl Interface

Definition

Provides a control that hosts HTML content in an app.

public interface class IWebViewControl
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.Guid(1066537750, 48240, 19418, 145, 54, 201, 67, 112, 137, 159, 171)]
struct IWebViewControl
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.Guid(1066537750, 48240, 19418, 145, 54, 201, 67, 112, 137, 159, 171)]
public interface IWebViewControl
Public Interface IWebViewControl
Derived
Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Properties

CanGoBack

Gets a value that indicates whether there is at least one page in the backward navigation history.

CanGoForward

Gets a value that indicates whether there is at least one page in the forward navigation history.

ContainsFullScreenElement

Gets a value that indicates whether the IWebViewControl contains an element that supports full screen.

DefaultBackgroundColor

Gets or sets the color to use as the IWebViewControl background when the HTML content does not specify a color.

DeferredPermissionRequests

Gets a collection of permission requests that are waiting to be granted or denied.

DocumentTitle

Gets the title of the page currently displayed in the IWebViewControl.

Settings

Gets a WebViewControlSettings object that contains properties to enable or disable IWebViewControl features.

Source

Gets or sets the Uniform Resource Identifier (URI) source of the HTML content to display in the IWebViewControl.

Methods

BuildLocalStreamUri(String, String)

Creates a URI that you can pass to NavigateToLocalStreamUri

CapturePreviewToStreamAsync(IRandomAccessStream)

Creates an image of the current IWebViewControl contents and writes it to the specified stream.

CaptureSelectedContentToDataPackageAsync()

Asynchronously gets a DataPackage that contains the selected content within the IWebViewControl.

GetDeferredPermissionRequestById(UInt32, WebViewControlDeferredPermissionRequest)

Returns the deferred permission request with the specified Id.

GoBack()

Navigates the IWebViewControl to the previous page in the navigation history.

GoForward()

Navigates the IWebViewControl to the next page in the navigation history.

InvokeScriptAsync(String, IIterable<String>)

Executes the specified script function from the currently loaded HTML, with specific arguments, as an asynchronous action.

Navigate(Uri)

Loads the HTML content at the specified Uniform Resource Identifier (URI).

NavigateToLocalStreamUri(Uri, IUriToStreamResolver)

Loads local web content at the specified URI using an IUriToStreamResolver.

NavigateToString(String)

Loads the specified HTML content as a new document.

NavigateWithHttpRequestMessage(HttpRequestMessage)

Navigates the IWebViewControl to a URI with a POST request and HTTP headers.

Refresh()

Reloads the current content in the IWebViewControl.

Stop()

Halts the current IWebViewControl navigation or download.

Events

ContainsFullScreenElementChanged

Occurs when the status of whether the IWebViewControl currently contains a full screen element or not changes.

ContentLoading

Occurs when the IWebViewControl has started loading new content.

DOMContentLoaded

Occurs when the IWebViewControl has finished parsing the current HTML content.

FrameContentLoading

Occurs when a frame in the IWebViewControl has finished parsing its current HTML content.

FrameDOMContentLoaded

Occurs when a frame in the IWebViewControl has finished parsing its current HTML content.

FrameNavigationCompleted

Occurs when a frame in the IWebViewControl has finished loading its content.

FrameNavigationStarting

Occurs before a frame in the IWebViewControl navigates to new content.

LongRunningScriptDetected

Occurs periodically while the IWebViewControl executes JavaScript, letting you halt the script.

NavigationCompleted

Occurs when the IWebViewControl has finished loading the current content or if navigation has failed.

NavigationStarting

Occurs before the IWebViewControl navigates to new content.

NewWindowRequested

Occurs when a user performs an action in the IWebViewControl that causes content to be opened in a new window.

PermissionRequested

Occurs when an action in an IWebViewControl requires that permission be granted.

ScriptNotify

Occurs when the content contained in the IWebViewControl passes a string to the application by using JavaScript.

UnsafeContentWarningDisplaying

Occurs when the IWebViewControl shows a warning page for content that was reported as unsafe by SmartScreen Filter.

UnsupportedUriSchemeIdentified

Occurs when an attempt is made to navigate to a Uniform Resource Identifier (URI) using a scheme that IWebViewControl doesn't support.

UnviewableContentIdentified

Occurs when the IWebViewControl attempts to download an unsupported file.

WebResourceRequested

Allows the interception of an HTTP request. This event is triggered every time an HTTP request is made.

Applies to