Hello,
Is there a way where I can listen to the changes in the webview or even the external browser's URL address changes from a .Net MAUI app?
In MAUI you could use the API to listen for URL changes in the WebView, while for external browsers, you are not authorized to listen.
You could refer to the following official documentation with a simple example:
<WebView WidthRequest="500" HeightRequest="1000" Source="https://www.bing.com" Navigating="WebView_Navigating"/>
private void WebView_Navigating(object sender, WebNavigatingEventArgs e)
{
if (e.Url.Contains("bing"))
{
Console.WriteLine("Bing is Navigating");
}
}
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.