Skip to content

NanUI是一个基于ChromiumFX开源项目和Chromium Embedded Framework(CEF)开源项目的,能够使用Html5、CSS3和Javascript构建.NET Winform界面的开源项目。

License

Notifications You must be signed in to change notification settings

ZhangFengwu/NanUI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to NanUI

NanUI is a library based on ChromiumFX that can let your Winform application use HTML5/CSS3 as user interface. You can use orginal Winform borders or full view no border form that use all html/css to design the interface.

NanUI is MIT licensed, so you can use it in both business and free/open source application. For more details, see the LICENSE file.

NanUI

What's new in version 0.6

  • Rewritted codes of no border interface logic, new version is faster than old versions.
  • NanUI now supports Hi-DPI in Windows 8 and later.
  • Combined HtmlUIForm and HtmlContentForm to one Formium which support these two styles.
  • Install Nuget Package of NanUI will add CEF and ChromiumFX dependencies to your application automatically.

Releases

Stable NanUI binaries are released on NuGet. Use following Nuget command to install latest version of NanUI to your Winfrom application. It will install CEF and CFX dependencies too and the dependencies will automatic copy to the bin folder.

Nuget Package Manager

PM> Install-Package NetDimension.NanUI

Download Manually

百度网盘

Basic Usage

Initialize Runtime in Main

namespace TestApplication
{
	using NetDimension.NanUI;
	static class Program
	{
		[STAThread]
		static void Main(string[] args)
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			//Initalize: set CEF paths
			var result = Bootstrap.Load(PlatformArch.Auto, System.IO.Path.Combine(Application.StartupPath, "fx"));
			
			if (result)
			{
				// Load embedded html/css resources in assembly.
				Bootstrap.RegisterAssemblyResources(System.Reflection.Assembly.GetExecutingAssembly());

				Application.Run(new Form1());

				Application.Exit();
			}

		}
	}
}

Using native Winform border style

namespace TestApplication
{
	public partial class Form1 : Formium

	{

		public Form1()
			//Load embedded resource index.html and not set form to no border style by the second parameter.
			: base("http://res.app.local/index.html", false)
		{
			InitializeComponent();
		}
	}
}

Using no border style

namespace TestApplication
{
	public partial class Form1 : Formium

	{

		public Form1()
			//Load embedded resource index.html and set form to no border style by igrone the second parameter or set it to true.
			: base("http://res.app.local/index.html")
		{
			InitializeComponent();
		}
	}
}

Documentation

I have no time for writting documents for the present, documents will come late.

Donate

If you like my work, please buy me a cup of coffee to encourage me continue with this library.

In China you can donate me by scaning the QR code below in Alipay or WeChat app.

Screen Shot

Or you can donate me by Paypal.

DONATE

About

NanUI是一个基于ChromiumFX开源项目和Chromium Embedded Framework(CEF)开源项目的,能够使用Html5、CSS3和Javascript构建.NET Winform界面的开源项目。

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%