Questions tagged [webview2]

Use the tag for the questions about Microsoft Edge WebView2 control. For current issues check https://github.com/MicrosoftEdge/WebView2Feedback/issues

Microsoft Edge WebView2 control uses Microsoft Edge (Chromium) as the rendering engine.

It can be used in Win32 C++ or .NET (WPF or WinForms) and WinUI 3 applications.

For further information, see the WebView2 documentation or the WebView2 feedback project for bugs and feature requests.

727 questions
0
votes
1 answer

How do I programmatically add a file to a fileupload control from a windows form to a webpage

I am using WebView2 in a C# windows application and I want to be able to upload screen captures. I capture the screen and save it to a file (jpg) on the local hard drive. I want to attach this file (upload) it to the FILEUPLOAD control on a web page…
Chris Dunlop
  • 135
  • 1
  • 13
0
votes
1 answer

Can WebView2 currently receive Keyboard inputs

I am trying to create a software in WPF which hosts a browser (WebView2 currently 1.0.818.41) and also show a OnScreenKeyboard when there is a input field focused in the browser. I have done this kind of stuff with CefSharp in WPF before but I…
Bado
  • 71
  • 10
0
votes
1 answer

GetText function in Webview2 in a .net framework WPF application

I've recently been trying out editors like an ace editor on Webview2, since cefsharp is very power-hungry. My problem is that I seem to not find a single way as to how to get the text inside the editor with C# code, there seem to be no functions…
arad
  • 1
0
votes
0 answers

Webview2 AdditionalBrowserArguments --Kiosk-printing

I'm trying to print using the Webview2 control. I can print with a dialog using the follwing code: Await WebView_Browser1.CoreWebView2.ExecuteScriptAsync("window.print();") But i would like to print silently. With Edge we can use the parameter…
Desz
  • 31
  • 7
0
votes
0 answers

c# Webview2 mirror in two different forms

is there anyway to clone or mirror a webview2 object in c#? I need it to show on two different forms and be able to access it in at least one of them.
0
votes
1 answer

set UserAgent in Webview2

i am creating a desktop application with Webview2 as browser. I have to change the user agent to get data from a website. My control name is Webview21 for the browser control. I got the error message System.NotImplementedException: 'Unable to cast…
user3025401
  • 181
  • 1
  • 9
0
votes
1 answer

Microsoft edge webView2 causes performance issue on citrix server

We have noticed that there is issue on the Citrix environment in regards to WebView2. We are trying to run office add-in inside the Outlook desktop (365) and as soon as Outlook tries to run the add-in we can see in the task manager that CPU and…
0
votes
1 answer

WebView2 - Access The Virtual Host

I setup WebView2 to have a virtual host and I am able to access an image based on a URL. The problem that i have is that i need get the number of files stored in the "virtual folder". Is that possible with WebView2? var env = await…
Zimo
  • 312
  • 5
  • 21
0
votes
2 answers

WebView2 control works while debugging a WPF project, but not after installed via vdproj installer

Solution below, thanks to Poul Bak and GrooverFromHolland for pointing out my poor async implementation which helped a bit. I simply moved the source assignment into the same method after the await so order of operations is correct, and also had to…
Matthew
  • 89
  • 1
  • 8
0
votes
1 answer

WebView2 - Capture Keyboard Events

I noticed that the "KeyUp" event captures only some of the keys (up, down, left, right, Ctrl, escape). In WebBrowser, that event captures all the keys in the keyboard. How do we add the event that adds a key pressed or released? Thanks WebView2…
Zimo
  • 312
  • 5
  • 21
0
votes
1 answer

stop webview2 from opening a new window rather a new tab

Hi I have been using webview2 for a while now on my projects, but I want it to open a new tab and not a new window, I also been using easytabs my code as of right now is e.NewWindow = webView.CoreWebView2; ParentTabs.AddNewTab(); i have done a lot…
Foreverably
  • 83
  • 1
  • 5
0
votes
0 answers

WebView2 - NavigateToString does not render images

I created a webView2 object and called a CoreWebView2.NavigateToString(string htmlpage) to render an HTML file (stored in memory as a string). The method renders all the HTML page except that the background image and the button images are not. No…
Zimo
  • 312
  • 5
  • 21
0
votes
1 answer

Basic Win32 WebView2 example not working in pure C

A new problem blows my mind lately: a very simple code using the WebView2 library from Microsoft works if compiled as C++ but not as C. What could be causing the problem? I tried all sorts of fixes, like using an older version of the WebView2…
user1371019
  • 159
  • 9
0
votes
0 answers

Screen pixelation issue with WebVew2 control in wpf

We are trying to migrate to webview2 control in WPF application. However, when I used the control as directed I came across this weird pixelation issue. I am attaching a screenshot of it. This happens after a few seconds when the screen remains idle…
Rahul Lore
  • 41
  • 5
0
votes
1 answer

ExecuteScriptAsync("document.GetElementsById('userId-input').outerHTML;;") returns null

I am able to do the following: (in NavigationCompletedAsync handler) ``` string0 = ExecuteScriptAsync("document.documentElement.outerHTML;"); Regex.Unescape(string0) string0.Remove(0, 1); string0.Remove(string0.Length - 1, 1); ``` I can see the…
HBC531
  • 47
  • 6