Skip to content

Proton is written on the top of WebView2 control that enables you to embed web technologies (HTML, CSS, and JavaScript) in your native applications powered by Microsoft Edge (Chromium)

Notifications You must be signed in to change notification settings

XHighIntell/Proton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proton

GitHub release GitHub Release Date .NET

Proton is built on top of the WebView2 control, which enables developers to embed web technologies—HTML, CSS, and JavaScript — into native applications powered by Microsoft Edge (Chromium). Proton inherited ideas from Electron, adopting its approach of using web technologies to build desktop applications.

Get it on NuGet

The nuget package can be found at nuget.org/packages/Proton

Technology backends

Electron uses NodeJs as its backend, while Proton is built on .NET, allowing developers to leverage built-in .NET features and better target the Win32 platform.

Supportability

The Proton package supports the below environments:

  • net6.0-windows and later version

Get Started

For quick start you can use win form template at https://github.com/XHighIntell/Proton/tree/master/src/QuickTemplate

var webView = new ProtonWebView(this) { Dock = DockStyle.Fill };
webView.AllowResizable = true;

var environment = await CoreWebView2Environment.CreateAsync(null, "chromium");
await webView.EnsureCoreWebView2Async(environment);
webView.DefaultBackgroundColor = Color.Transparent;

//WebView.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; // Uncomment this line if you want to disable the context menus
webView.CoreWebView2.SetVirtualHostNameToFolderMapping("localhost.pro", AppDomain.CurrentDomain.BaseDirectory + "wwwroot", CoreWebView2HostResourceAccessKind.Allow);
webView.CoreWebView2.Navigate("http://localhost.pro/demo.html");

this.Controls.Add(webView);

About

Proton is written on the top of WebView2 control that enables you to embed web technologies (HTML, CSS, and JavaScript) in your native applications powered by Microsoft Edge (Chromium)

Resources

Stars

Watchers

Forks

Packages

No packages published