locked
Is there a way to update the WPF WebView's Microsoft Edge Browser version? RRS feed

  • Question

  • I currently have Visual Studio 2019 and created a WPF app. I installed Microsoft's WebView (an updated web browser) through the Nuget Manager. I ran the app and sure enough it worked flawlessly but after checking the browser's version, it was using the old Edge 18.

    My code's extremely simple as I was just testing out the browser, I just added the browser inside the Main Grid and did nothing else:

    <Window x:Class="WebViewTrial3.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:local="clr-namespace:WebViewTrial3" 
            xmlns:controls="clr-namespace:Microsoft.Toolkit.Wpf.UI.Controls;assembly=Microsoft.Toolkit.Wpf.UI.Controls.WebView"
            mc:Ignorable="d"
            Title="MainWindow" Height="450" Width="800">
        <Grid>
            <controls:WebView Source="https://html5test.com/"/>
        </Grid>
    </Window>

    What I tried: I tried installing the latest version of Microsoft Edge (v81) and rebuild the app. Unfortunately it still runs the old Edge 18 instead of the Edge 81.

    What I wanted to happen: I was expecting it to run the Microsoft Edge 81 as I was under the impression that it would simply use the latest Microsoft Edge.

    Is there a way to change the version of Microsoft Edge that the WebView is using?

    Friday, April 17, 2020 5:12 PM

All replies

  • Hi MarkusBrown,

    Welcome to MSDN forum.

    After my research, sorry to say that the feature isn’t available in WebView control. As I know, the WebView2 control supports target different version of the Microsoft Edge(Chromium) browser, please have a try with using the NuGet package: https://www.nuget.org/packages/MtrDev.WebView2.Wpf/.

    BTW, this issue is more about WPF, if it persists, I suggest you redirect to Microsoft Q&A forum to get a more professional help. Thanks for your understanding.

    If you have any other issues about Visual Studio Setup and Installation in the future, please feel free to let us know.

    Have a nice day.

    Best Regards,

    Anna

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Monday, April 20, 2020 8:38 AM