NativeWebView
Overview
NativeWebView
is a control that provides a native web browser implementation for Avalonia and WPF applications. It wraps platform-specific web controls and provides a unified API for web browsing functionality.
Properties
Source
public Uri Source { get; set; }
The URI of the top-level document displayed in the WebView. Setting this property is equivalent to calling Navigate()
.
Default value: about:blank
CanGoBack
public bool CanGoBack { get; }
Indicates whether the WebView can navigate to a previous page in the navigation history.
CanGoForward
public bool CanGoForward { get; }
Indicates whether the WebView can navigate to a next page in the navigation history.
Events
NavigationCompleted
public event EventHandler<WebViewNavigationCompletedEventArgs>? NavigationCompleted;
Fires after navigation of the top-level document completes rendering, either successfully or unsuccessfully.
NavigationStarted
public event EventHandler<WebViewNavigationStartingEventArgs>? NavigationStarted;
Fires before a new navigation starts for the top-level document.