webview2

UWP WebView2 not working with WebView2 Runtime installed

家住魔仙堡 提交于 2021-01-05 12:45:27
问题 I've created a WinUI 3.0 UWP application and installed the WebView2 runtime as per documentation. When I inspect the regkey and its pv property, per documentation, it is set. However, when launching my app, regardless of in debug or release, I see the A suitable version of Microsoft Edge was not detected The XML itself is extremely simple: <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition

VB.Net Webview2 How can I get html source code?

ぐ巨炮叔叔 提交于 2020-12-06 14:57:07
问题 I sucessfully display a web site on WebView2 in my VB.net (Visual Studio 2017) project but can not get html souce code. Please advise me how to get html code. My code: Private Sub testbtn_Click(sender As Object, e As EventArgs) Handles testbtn.Click WebView2.CoreWebView2.Navigate("https://www.microsoft.com/") End Sub Private Sub WebView2_NavigationCompleted(sender As Object, e As CoreWebView2NavigationCompletedEventArgs) Handles WebView2.NavigationCompleted Dim html As String = ????? End Sub

WebView2 control not loading HTML string

痞子三分冷 提交于 2020-08-09 19:15:27
问题 WebView2 Control: As shown below, the HTML String successfully loads via NavigateToString(...) call inside Button_Click(...) event. But I need to have the HTML string loaded as soon as the Window and/or its Grid is loaded. But the following code either inside the constructor MainWindow(){...} or inside rootGrid_Loadded(...) event throws the error shown below: Question : How can we have the issue resolved and have the HTML string loaded right after either the Window or the Grid is loaded? Or

WinUI 3.0 - UWP: Error on WebView2 Print functionality

最后都变了- 提交于 2020-07-23 06:24:06
问题 In my WinUI 3.0 - UWP project, I have a WebView2 control that displays a simple html as follows. But when I call the following javascript code using ExecuteScriptAsync (as shown below), I get the following error: Error : Check your printer or select another printer. The printer you chose isn't available or isn't installed correctly. Screenshot of Error : Remarks : There is nothing wrong on my Windows 10's default Print to PDF printer as I can print the exact same html page from a browser (MS

WinUI 3.0 - UWP: Error on WebView2 Print functionality

非 Y 不嫁゛ 提交于 2020-07-23 06:23:33
问题 In my WinUI 3.0 - UWP project, I have a WebView2 control that displays a simple html as follows. But when I call the following javascript code using ExecuteScriptAsync (as shown below), I get the following error: Error : Check your printer or select another printer. The printer you chose isn't available or isn't installed correctly. Screenshot of Error : Remarks : There is nothing wrong on my Windows 10's default Print to PDF printer as I can print the exact same html page from a browser (MS

WinUI 3.0 - UWP: Error on WebView2 Print functionality

烈酒焚心 提交于 2020-07-23 06:22:44
问题 In my WinUI 3.0 - UWP project, I have a WebView2 control that displays a simple html as follows. But when I call the following javascript code using ExecuteScriptAsync (as shown below), I get the following error: Error : Check your printer or select another printer. The printer you chose isn't available or isn't installed correctly. Screenshot of Error : Remarks : There is nothing wrong on my Windows 10's default Print to PDF printer as I can print the exact same html page from a browser (MS

How can I use the Microsoft Edge WebView2 control in C# windows application

孤街浪徒 提交于 2020-06-27 08:05:02
问题 How can I use the Microsoft Edge WebView2 control in C# windows application using visual studio ?. Thanks 回答1: Now in 2020 WebView2 supports both WPF and WinForms so you can try to use it in your application. https://docs.microsoft.com/en-us/microsoft-edge/webview2/ https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/wpf Basically you need to add Nuget package Microsoft.Web.WebView2 and then use WebView2 control. 回答2: You cannot currently do it without some hacks as it is

Microsoft Edge WebView2 - Sample crashes on Load

烂漫一生 提交于 2020-06-15 04:07:34
问题 I took the latest version of Microsoft.Web.WebView2 (0.9.515-prerelease) and added to a test C# WinForms application. Am using VS 2019, .NET framework is 4.7.2. Placed the WebView2 control on a form, compiled and ran. The application crashed on Load, at the below point in Form1.designer.cs. // webView21 // this.webView21.Location = new System.Drawing.Point(153, 66); this.webView21.Name = "webView21"; this.webView21.Size = new System.Drawing.Size(492, 253); this.webView21.Source = new System