Now, I wanted to create rich and interactive user interfaces in desktop application too, and I thought that WPF would be an answer to that.
I guess I was wrong, WPF is needlessly complex and very unintuitive to work with. You actually have to write a dozen lines of code to create a button that doesn't look too horrible.
Don't take it the wrong way. WPF is great, but not for designing user interfaces. So I pretty much gave up on creating rich UI's for desktop applications.
Let's start simpleI'm using WPF in all the examples below. Don't worry, it's all just basic WPF.
So how does it work?Let me quickly explain how we'll work.
- Design your GUI using your favourite tools.
- Code your design using HTML and CSS (HTML5 and CSS3 supported!)
[csharp]webcontrol.SetObjectCallback("guiController", "login", onLoginCall);
private void onLoginCall(object sender, JSCallbackEventArgs e)
var arg1 = e.Arguments.ToString();
var arg2 = e.Arguments.ToString();
- Update the GUI if needed by calling one of the functions (See step 3) that interface with the GUI.
I will probably write a little tutorial later on how to use Awesomium in-depth. Stay tuned for more!
On a side-note: I've added the project to my Github.