WebView Navigated Event Not Triggered in .NET MAUI

Manjunath Vadigeri 0 Reputation points
2024-12-04T09:00:00.18+00:00

I am experiencing an issue with the WebView control in my .NET MAUI app where the Navigated event does not fire after navigation.

Here’s the scenario:

  1. The Source property of the WebView is set to a valid URL.
  2. I have subscribed to the Navigated event in code behind
  3. Despite this, the Navigated event handler is not invoked after the navigation is completed.
  4. The Navigating event is triggered as expected.

I am trying to implement a loading activity indicator while the webpage is being loaded. The activity indicator is made visible when Navigating is triggered, but never goes off since Navigated event is not getting triggered.

Troubleshooting Done:

  1. Verified that the Navigated event is subscribed properly.
  2. Ensured the URL is valid and accessible via a regular browser.
  3. Confirmed platform-specific configurations:
    • Android: INTERNET permission is present in AndroidManifest.xml.

Why is the Navigated event not being triggered, and how can I resolve this issue? Any insights or solutions would be greatly appreciated!

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,067 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,859 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.