UWP WebView

Shandera 66 Reputation points
2022-01-16T06:08:57.59+00:00

Hello. Used a WebView to display the site in a UWP app. But the site says that the web browser is outdated or not supported. Development environment Visual Studio 2022, Windows 10. What can be done to correct the situation? I heard that there is WebView2, but it doesn't seem to work with UWP, or can I install it somehow? Perhaps there is another way to solve this problem?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,283 questions
Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Roy Li - MSFT 31,551 Reputation points Microsoft Vendor
    2022-01-17T02:13:24.87+00:00

    Hello,

    Welcome to Microsoft Q&A!

    I heard that there is WebView2, but it doesn't seem to work with UWP, or can I install it somehow?

    The core of the native Webview control in UWP is old Edge. Now, the Edge is updated with chrome as its core. So, the native Webview control in UWP is outdated as you've seen. WebView2 is the solution for your scenario. You could use it from the WinUI2 library in the UWP app. What you need to do is to install the WinUI2 library (2.7 or higher) NuGet package inside your UWP app. You could refer to this document : Get started with WebView2 in WinUI 2 (UWP) apps (public preview).

    Thank you.


    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.


0 additional answers

Sort by: Most helpful