itagnesmeyer / diga.webview2 Goto Github PK
View Code? Open in Web Editor NEWWebView2 Wrapper
License: MIT License
WebView2 Wrapper
License: MIT License
I created a .NET 6 Winforms app. Placed the Diga.WebView2.WinForms.WebView control on the form with a Go button. The Go handler sets the url property but the control doesn't load anything. Upon inspecting the source of WebView control, it's checking the value of CheckIsCreatedOrEnded which checks the value of the IsCreated value. In my case IsCreated is false. Why is it false if the control is showing on the form during runtime? What am I missing?
It didn't work when using the Nuget package but it worked when referencing the Diga.WebView2.WinForms project. I don't know why.
Diga.WebView2.WinForms NET-Framework. Application crash after Process Exit.
See Issue 9
Work Around
This is now catched:
When the last instance of the control is closed, a wait function is automatically attached to the CurrentDomain.ProcessExit event. The wait function waits about 5 seconds.
Hi,
I greatly appreciate your work. Showing reports works fine, I just have a problem showing / modifying the ContextMenu for a WebBrowser. Is there any magic to be done for that?
I currently have this code:
<wpf:WebView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" utils:Utils.BindableSource="{Binding HtmlPage}" NavigationCompleted="WebBrowser_LoadCompleted" >
<wpf:WebView.ContextMenu>
<ContextMenu>
<ContextMenu.Items>
<MenuItem Header="{DynamicResource Commands:ShowXmlSource}" Command="{Binding ShowXmlSourceCommand}" />
</ContextMenu.Items>
</ContextMenu>
</wpf:WebView.ContextMenu>
</wpf:WebView>
But on right-click, nothing happens - not even the browser built-in context menu is shown...
Thanks for your work
best regards
Christian
Any idea why this error is occurring "The program '[2188] ......exe' has exited with code -2147483645 (0x80000003)"? Crashed after a few hours of running the application.
Hello:
I found your repo, it seems to be interesting. However, I can’t find useful code example for my needs.
For example, I have one MP4 file: C:\Video2\1.mp4.
I can launch ME Edge, and press Ctrl-O to open this mp4 file and play it in Edge.
I want to do the same in a WinForm app. I can add one button (Button1), and if I click on Button1, then I want to launch WebView2 and begin to play the MP4 file.
For MS WebView2, I can add one WebView2 control to Form1, and call some method, like:
webView2.Source = new Uri(@"C:\Video2\1.mp4");
To view the MP4 video.
Let me know how I can do the same in your repo.
By the way, I want to know 2 most important features, which if not impossible, but difficult.
First, can I get the DOM element in your repo?
Like: var some_objs = Document.getElementsByClassName(“class_name1”).
Second, can I upload some file to one web page. If I can visit youtube, and I want to upload the MP4 video:
"C:\Video2\1.mp4" to my youtube channel.
Please advise!
Thanks,
I want to use the SendMouseInput and SendTouchInput Function, Like CefSharp‘s SendMouseEvent \ SendKeyEvent.
so i Add the funcs in the project WinForms, in the class file : WebView.Functions.cs
public void SendTouchInput(COREWEBVIEW2_POINTER_EVENT_KIND eventType, WebView2PointerInfo pointerInfo)
{
this._WebViewControl.SendPointInput(eventType, pointerInfo);
};
public void SendMouseInput(COREWEBVIEW2_MOUSE_EVENT_KIND eventType,
COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS virtualKeys, uint mouseDate, Wrapper.Types.Point point)
{
this._WebViewControl.SendMouseInput(eventType, virtualKeys, mouseDate, point);
};
When trying to access GetDOMWindow.frames.item(0) it states this is ambiguous since there is a property named the same is there anyway to update this so they are seperate names I am unable to get each frame due to this error.
If the WebView2 control is used on the main form and a modal alert is called there via Diga.WebView2.Scripting, the application hangs after the window is closed.
Now, as soon as the last WebView2 control is closed and a task is still open. An exception is thrown.
Diga.Core.Threading.UIDispatcherFinalDisposeException. And the open threads will be resolved. So that the application can be terminated.
Is there a way to create your own resource request if not how do you get the info from the response ones that come back because I have tried the event handler for webresourceresponse but content is null but looking at the developer menu of the webpage you can 👀 the i for pulled back and I need to get some info from this because I can’t call the url directly since it will give access denied.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.