How to Embed Gecko or Webkit in a Windows Form Just Like a Webview

Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?

http://code.google.com/p/geckofx/

This is a nice .NET-wrapped version of Gecko

Is there an embeddable Webkit component for Windows / C# development?

There's a WebKit-Sharp component on Mono's GitHub Repository. I can't find any web-viewable documentation on it, and I'm not even sure if it's WinForms or GTK# (can't grab the source from here to check at the moment), but it's probably your best bet, either way.

Is there WinForms control for Chromium-Edge HTML renderer?

WebView2

The Microsoft Edge WebView2 control enables you to host web content in your application using Microsoft Edge (Chromium) as the rendering engine.

The control is available on the following programming environments:

  • Win32 C/C++ (GA)
  • .NET Framework 4.6.2 or later
  • .NET Core 3.1 or later
  • .NET 5

Getting started with WebView2

  1. Install prerequisites on your machine:

    • WebView2 Runtime
    • Microsoft Edge Chromium
  2. Create a Windows Forms Application.

  3. Install WebView2 NuGet package in your project.

  4. Drop an instance of the WebView2 from toolbox on your form.

  5. Set the Source property to a valid URL like: Https://bing.com and run the application.

More information

  • Getting started with WebView2 in Windows Forms apps
  • Sample WinForms Application - GitHub Repository
  • WebView2 class reference.

Note: WebView2 will replace the WebView control in the toolkit. WebView has already been marked as obsolete.



Related Topics



Leave a reply



Submit