NativeWebDialog Class
Definition
Avalonia.Controls.NativeWebDialog is a dialog window that hosts a native web browser implementation. It provides a way to display web content in a separate window, particularly useful for platforms like Linux where embedded WebView controls might not be available.
public class NativeWebDialog
Constructors
| Name | Description |
|---|---|
| NativeWebDialog | No summary available. |
NativeWebDialog Constructor
public NativeWebDialog()
Methods
| Name | Description |
|---|---|
| Close | No summary available. |
| Dispose | No summary available. |
| GoBack | No summary available. |
| GoForward | No summary available. |
| InvokeScript | No summary available. |
| Move | No summary available. |
| Navigate | No summary available. |
| NavigateToString | No summary available. |
| PrintToPdfStreamAsync (2 overloads) | No summary available. |
| Refresh | No summary available. |
| Resize | No summary available. |
| Show (2 overloads) | No summary available. |
| ShowPrintUI | No summary available. |
| Stop | No summary available. |
| TryGetCommandManager | No summary available. |
| TryGetCookieManager | No summary available. |
| TryGetPlatformHandle | No summary available. |
| TryGetWebViewPlatformHandle | Gets platform handle of the webview hosted inside the dialog. |
| TryGetWindow | If dialog is based on a Avalonia.Controls.Window, returns its instance to allow full control. |
Close Method
public void Close()
Dispose Method
public void Dispose()
GoBack Method
public bool GoBack()
Returns
bool
GoForward Method
public bool GoForward()
Returns
bool
InvokeScript Method
public System.Threading.Tasks.Task<string> InvokeScript(string script)
Parameters
script string
Returns
System.Threading.Tasks.Task<string>
Move Method
public bool Move(int x, int y)
Parameters
x int
y int
Returns
bool
Navigate Method
public void Navigate(Uri url)
Parameters
url Uri
NavigateToString Method
public void NavigateToString(string text)
Parameters
text string
PrintToPdfStreamAsync overloads
PrintToPdfStreamAsync Method
public System.Threading.Tasks.Task<System.IO.Stream> PrintToPdfStreamAsync()
Returns
System.Threading.Tasks.Task<System.IO.Stream>
PrintToPdfStreamAsync Method
public System.Threading.Tasks.Task<System.IO.Stream> PrintToPdfStreamAsync(Avalonia.Platform.WebViewPrintSettings printSettings)
Parameters
printSettings Avalonia.Platform.WebViewPrintSettings
Returns
System.Threading.Tasks.Task<System.IO.Stream>
Refresh Method
public bool Refresh()
Returns
bool
Resize Method
public bool Resize(int width, int height)
Parameters
width int
height int
Returns
bool
Show overloads
Show Method
public void Show()
Show Method
Opens the WebView dialog with Avalonia.Controls.TopLevel owner.
public void Show(Avalonia.Controls.TopLevel owner)
Parameters
ShowPrintUI Method
public void ShowPrintUI()
Stop Method
public bool Stop()
Returns
bool
TryGetCommandManager Method
public Avalonia.Controls.NativeWebViewCommandManager TryGetCommandManager()
Returns
TryGetCookieManager Method
public Avalonia.Controls.NativeWebViewCookieManager TryGetCookieManager()
Returns
TryGetPlatformHandle Method
public Avalonia.Platform.IPlatformHandle TryGetPlatformHandle()
Returns
TryGetWebViewPlatformHandle Method
Gets platform handle of the webview hosted inside the dialog.
public Avalonia.Platform.IPlatformHandle TryGetWebViewPlatformHandle()
Returns
TryGetWindow Method
If dialog is based on a Avalonia.Controls.Window, returns its instance to allow full control.
public Avalonia.Controls.Window TryGetWindow()
Returns
Properties
| Name | Description |
|---|---|
| CanGoBack | No summary available. |
| CanGoForward | No summary available. |
| CanUserResize | No summary available. |
| Source | No summary available. |
| Title | No summary available. |
CanGoBack Property
public bool CanGoBack { get; set; }
CanGoForward Property
public bool CanGoForward { get; set; }
CanUserResize Property
public bool CanUserResize { get; set; }
Source Property
public Uri Source { get; set; }
Title Property
public string Title { get; set; }
Events
| Name | Description |
|---|---|
| AdapterCreated | No summary available. |
| AdapterDestroyed | No summary available. |
| Closing | No summary available. |
| EnvironmentRequested | No summary available. |
| NavigationCompleted | No summary available. |
| NavigationStarted | No summary available. |
| NewWindowRequested | No summary available. |
| WebMessageReceived | No summary available. |
| WebResourceRequested | No summary available. |
AdapterCreated Event
public event EventHandler<Avalonia.Controls.WebViewAdapterEventArgs> AdapterCreated
AdapterDestroyed Event
public event EventHandler<Avalonia.Controls.WebViewAdapterEventArgs> AdapterDestroyed
Closing Event
public event EventHandler Closing
EnvironmentRequested Event
public event EventHandler<Avalonia.Controls.WebViewEnvironmentRequestedEventArgs> EnvironmentRequested
NavigationCompleted Event
public event EventHandler<Avalonia.Controls.WebViewNavigationCompletedEventArgs> NavigationCompleted
NavigationStarted Event
public event EventHandler<Avalonia.Controls.WebViewNavigationStartingEventArgs> NavigationStarted
NewWindowRequested Event
public event EventHandler<Avalonia.Controls.WebViewNewWindowRequestedEventArgs> NewWindowRequested
WebMessageReceived Event
public event EventHandler<Avalonia.Controls.WebMessageReceivedEventArgs> WebMessageReceived
WebResourceRequested Event
public event EventHandler<Avalonia.Controls.WebResourceRequestedEventArgs> WebResourceRequested