-
Notifications
You must be signed in to change notification settings - Fork 8
Features
-Basic type such as string, int, double, decimal are transformed in their javascript equivalent.
-C# DateTime type is mapped to javascript dateTime.
-Enum is transfomed to custom javascript object containing two properties: intValue and displayName. intValue is the numeric value of the enum, displayName is the value of the Description attribute if any or the object.ToString() value.
-Complex object are mapped to javascript using reflection on public attributes.
-Tracking of property changes via INotifyPropertyChanges interface. This way changes in the ViewModel are reflected in the HTML View.
-Tracking of collection changes is supported listening INotifyCollectionChanges interface. This way, any collection implementing this interface will be updated in the view when changing. This provides native integration with ObservableCollection.
-ICommand support via the custom command knockoutjs data-bind property that allows you for example to associate C# code excecution when clicking to a button.
-Nested ViewModel fully supported
-One to one object mapping (that is if you have a same object referenced n times in your C# ViewModel, it will be mapped only one time and reference n times in the javascript session).
-Changes in HTML View are propagated to ViewModel using knockoutjs subscription (both property and collection). This allows you for example to have a collection binding to the selected items in the HTML view that will bind to your ViewModelCollection.
Full working examples are provided in the MVVMAwesomium solution. See projects:
- MVVMAwesomium.UI
- MVVMAwesomium.UI.Calendar
- MVVMAwesomium.UI.SelectedItems
- MVVMAwesomium.UI2