What is the "Order of Operations" (OOP) for Data Binding in Caliburn.Micro Xamarin Android (Mono.Android)?
PS: a tutorial that explains/compares how binding occurs in Caliburn Micro Standard/WPF, Caliburn Micro Android & Caliburn Micro iOS (ie Caliburn.Micro Xamarin) would be very useful and a nice introduction into Caliburn Micro Xamarin.
For regular Caliburn.Micro the OOP for Binding is (correct me if I am wrong):
NotifyOfPropertyChange(..)
x:Name
I've inspected the example projects Hello.Xamarin
and HubBrowser
and I think I have a bit of an idea how it works but it looks like there is ALOT of setup required. For Caliburn.Micro Xamarin Android is the Binding OOP something like...?
NotifyPropertyChanged
method. Not sure why...maybe so it works for Android? We produce a static class called NotifyPropertyChangedExtensions
NotifyOfPropertyChange(..)
(same as standard CM) android:id
Essentially the OOP you have indicated for the Windows flavor of binding occurs under the hood, the system is ViewModel first meaning everything starts with a viewmodel from there we look to see if we have a View with the same namespace and name. If we find it, great, now mash them together with a binding operation essentially setting the Datacontext of the view with the instance of the viewmodel. Otherwise, fail give the resultant screen a default blank stare back at you :(.
Since the stuff associated with binding in Xamarin / Native is slightly different hence some of the features will probably come at a later date with more tutorials / samples as people get a chance to road test the code.
Link has some of the stuff yet to complete and stuff that is complete with explanations as to why or why not. https://github.com/Caliburn-Micro/Caliburn.Micro/issues/142
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With