Skip to content

kleinsimon/LV-WebView2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LV-WebView2

Provides a XControl wrapping the .net "WebView2" control, which provides a modern browser based on MS Edge. The control provides basic abilities and events. Tested under Windows 10 and 11 with 32 and 64 bit. Created with LV 2020, but should work with lower versions (not converted yet).

Features

  • Drop in browser control
  • customizable paths and environment options
  • Javascript execution with result
  • WebMessage sending and reception through events
  • Content by URI or raw HTML
  • Status Events
  • PDF printing

Installation

Install the WebView2 Runtime from Microsoft

Install the package from VIPM.

The required .net library from nuget is already included (Version 1.0.2088.41 by now).

License

Please pay attention to the license of WebView2, which can be found in the package directory.

Usage

Look at the provided examples for usage details.

For more advanced use-cases, you can retrieve the .net control reference with a property node. With this reference, you can retrieve the corewebview2 reference, which provides the full webview2 toolset (save pdfs, load http, send webmessages etc.)

Compilation

To build your application, you have to manually copy the 2 DLLs from Libs to the same folder as your exe:

  • Microsoft.Web.WebView2.Core.dll
  • Microsoft.Web.WebView2.WinForms.dll

Additionally, you have to provide the WebView2Loader.dll for the target architecture. Either copy it to the exe folder, or point the "Native Path" in "Init Core" to the right folder.