-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Awesomium is a great component that enable to host HTML UI engine in a C# application. If you want to use it as an UI for a native application, you will need a way to bind your application data to your html-CSS-javascript UI.
What if you had a library that will do this binding for you and let you re-use 100% of ViewModel you wrote as "traditional" WPF ViewModel (that is : using the INotifyPropertyChanged, INotifyCollectionChanged, ICommand intefaces)?
MVVM for awesomium is such a library leveraging the possibility to inject C# code to javascript offered by Awesomium and the power of knockoutjs javascript MVVM library. This way you can bind your viewmodel to your HTLM UI in two lines of C# code.
Moreover knockoutjs extensibility allows you to bind to virtualy any HTLM component!
MVVM for awesomium is made of 3 distinct components (it is notable the two first can be used without the third): -The binding API that maps C# objects to javascript objects and manage synchronization between them using subscription to corresponding listeners. -a few knockout custom binders that act as helpers to create HTML binding (such as the command binding to bind to an ICommand) -Navigation API allows to associate local HTML file with viewmodel type in order to construct routing. This enables to build a complete application using MVVM for awesomium. The navigation API allows to play javascript animation as transition beetween views using knockout binding.