CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
383 stars 89 forks source link

WebView2 does not show anything. Only gray screen [WebView] #302

Closed meJevin closed 3 years ago

meJevin commented 3 years ago

This is a duplicate of #104 , but you guys are not fixing it so I thought I would create another issue.

I've followed this tutorial: https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/wpf

But the control that I put into my main window is just gray: image

What I put into Grid in MainWindow:

<wv2:WebView2 Name = "webView"
      Source = "https://www.microsoft.com"
              Height="300"
/>

I'm not getting any errors, nothing in the console.

However the old version of WebView works fine (although in a really weird way, noly when I launch application as Admin).

Navigating to different links programmatically doesn't work too.

Setup: Windows 10, WPF on .Net Core 3.1, VS2019

meJevin commented 3 years ago

UPDATE!!

This is a silly mistake, I'm really sorry. After installing WebView2 Runtime from https://developer.microsoft.com/en-us/microsoft-edge/webview2/ Browser seems to be working just fine!