CoreWebView2.Navigate(String) Method

Definition

Causes a navigation of the top level document to the specified URI.

public void Navigate(string uri);
member this.Navigate : string -> unit
Public Sub Navigate (uri As String)

Parameters

uri
String

The URI to navigate to.

Examples

// Setting _iWebView2.Source will not trigger a navigation if the Source is the same
// as the previous Source.CoreWebView.Navigate() will always trigger a navigation apart
// from few cases:
// 1. When called again after adding fragment to the url, or
// 2. When called again on the same fragmented url.
_iWebView2.CoreWebView2.Navigate(uri.ToString());

Remarks

For more information, navigate to Navigation event. Note that this operation starts a navigation and the corresponding NavigationStarting event is raised sometime after Navigate runs.

Applies to

See also