Skip to content
Discussion options

You must be logged in to vote

I was able to make it work by using the same method used in the Media App Samples for Xbox repository. Like so:

        private async void SetupWebview ()
        {
            await WebView.EnsureCoreWebView2Async();
            string page = "https://localHTML/index.html";
            WebView.CoreWebView2.SetVirtualHostNameToFolderMapping("localHTML", "www", Microsoft.Web.WebView2.Core.CoreWebView2HostResourceAccessKind.Allow);
            WebView.Source = new Uri(page);

        }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kizerkizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant