NavigateToString method
TOC
Collapse the table of content
Expand the table of content

WebView.NavigateToString method

Loads the specified HTML content as a new document.

Syntax


public void NavigateToString(
  string text
)

Parameters

text

Type: System.String [.NET] | Platform::String [C++]

The HTML content to display in the WebView control.

Remarks

NavigateToString is asynchronous. Use the NavigationCompleted event to detect when navigation has completed. 

Note  NavigationCompleted replaces LoadCompleted starting with Windows 8.1. In apps compiled for Windows 8, use LoadCompleted instead.
 

NavigateToString supports content with references to external files such as CSS, scripts, images, and fonts. However, it does not provide a way to generate or provide these resources programmatically. Windows 8.1 introduces NavigateToLocalStreamUri to provide this support.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

WebView
LoadCompleted
NavigationCompleted
NavigateToLocalStreamUri
WebView control (XAML) sample (Windows 10)

 

 

Show:
© 2016 Microsoft