© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
2 replies
Padfoot

Changing Source on WebView MAUI results in using file scheme

Hello!
I have a simple function which I'm using to change the source of my webview in MAUI. It works for my Android 11 phone but uses file scheme for a newer phone.
internal void RedirectWebView(string url)
{
    try
    {
        wvMain.Source = new UrlWebViewSource
        {
            Url = url
        };
    }
    catch (Exception ex)
    {
        Debug.WriteLine(ex.Message);
    }
}
internal void RedirectWebView(string url)
{
    try
    {
        wvMain.Source = new UrlWebViewSource
        {
            Url = url
        };
    }
    catch (Exception ex)
    {
        Debug.WriteLine(ex.Message);
    }
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WebView in NET8 MAUI MacOS wont show popup
C#CC# / help
3y ago
MAUI Webview target=_blank href redirects not working on android
C#CC# / help
4y ago
❔ How to control content security policy in MAUI Blazor webview?
C#CC# / help
3y ago
Maui issues after changing namespace
C#CC# / help
2y ago