WebView2.NavigateToString(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Renders the provided HTML as the top level document of the WebView2. This is equivalent to NavigateToString(String).
public void NavigateToString (string htmlContent);
member this.NavigateToString : string -> unit
Public Sub NavigateToString (htmlContent As String)
Parameters
- htmlContent
- String
Exceptions
Thrown when browser process has unexpectedly and left this control in an invalid state. We are considering throwing a different type of exception for this case in the future.
Remarks
The htmlContent
parameter may not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size. The origin of the new page is about:blank
.