Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/user-interface/controls/webview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,25 @@ The .NET Multi-platform App UI (.NET MAUI) <xref:Microsoft.Maui.Controls.WebView

<xref:Microsoft.Maui.Controls.WebView> defines the following properties:

::: moniker range="=net-maui-7.0"

- `Cookies`, of type `CookieContainer`, provides storage for a collection of cookies.
- `CanGoBack`, of type `bool`, indicates whether the user can navigate to previous pages. This is a read-only property.
- `CanGoForward`, of type `bool`, indicates whether the user can navigate forward. This is a read-only property.
- `Source`, of type `WebViewSource`, represents the location that the <xref:Microsoft.Maui.Controls.WebView> displays.

::: moniker-end

::: moniker range=">=net-maui-8.0"

- `Cookies`, of type `CookieContainer`, provides storage for a collection of cookies.
- `CanGoBack`, of type `bool`, indicates whether the user can navigate to previous pages. This is a read-only property.
- `CanGoForward`, of type `bool`, indicates whether the user can navigate forward. This is a read-only property.
- `Source`, of type `WebViewSource`, represents the location that the <xref:Microsoft.Maui.Controls.WebView> displays.
- `UserAgent`, of type `string`, represents the user agent. The default value is the user agent of the underlying platform browser, or `null` if it can't be determined.

::: moniker-end

These properties are backed by <xref:Microsoft.Maui.Controls.BindableProperty> objects, which means that they can be targets of data bindings, and styled.

The `Source` property can be set to an `UrlWebViewSource` object or a `HtmlWebViewSource` object, which both derive from `WebViewSource`. A `UrlWebViewSource` is used for loading a web page specified with a URL, while a `HtmlWebViewSource` object is used for loading a local HTML file, or local HTML.
Expand Down