Closed da3dsoul closed 3 years ago
I figured that out. Frame.Url wasn't populating my intellisense, but I could find it through debug inspection.
Programmatically navigating to a URL is where I'm at.
Dispatcher.UIThread.InvokeAsync(() =>
{
var webview = this.FindControl<AvaloniaCefBrowser>("WebView");
webview.StartUrl = uri;
});
It doesn't work for some reason. My first guess is that it's not an observable property by default.
There should be a helper method for this. I found it in the code for the WPF one. For future people:
var webview = this.FindControl<AvaloniaCefBrowser>("WebView");
webview.Browser.GetMainFrame().LoadUrl(url);
There seems to be an event for starting and finished loading, but it doesn't even give the URL. Is there some way to extract the URL from the Avalonia (I assume it's the same across them) webview control?