Skip to content
David Desmaisons edited this page Sep 14, 2016 · 20 revisions

Welcome to the MVVM.CEF.Glue wiki!

Why MVVM.CEF.Glue for MVVM.CEF.Glue?

CEF and CEFGlue are a great framework that enable to host HTML UI engine in a C++ and 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, dealing with complex threading and mapping constraints.

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 CEF(Glue) is such a library leveraging the possibility to inject C# code to javascript offered by CEFGlue 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.CEF.Glue is made of 3 main 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.CEF.Glue. The navigation API allows to play javascript animation as transition beetween views using knockout binding.

Clone this wiki locally