Record my iOS Droid login page using MVVMCross.
that's what i still
var bindingSet = this.CreateBindingSet<LoginPageView, LoginPageViewModel>(); bindingSet.Bind(this.UsernameTextField).To(x => x.UserName).TwoWay(); bindingSet.Bind(this.UsernameTextField).For(x=>x.Enabled).To(x => !x.LoggingIn); bindingSet.Apply();
The bind "UserName" successfully binds to UsernameTextField. However, when LogCommand is fired (excluded for brevity), I have to configure the UI element as "Enabled = false" while the login procedure is in progress.
The above code does not execute at runtime when binding x.Enabled, with
System.ArgumentException: Property expression must be of the form 'x => x.SomeProperty.SomeOtherProperty'
I have to write the wrong binding, since I DO NOT want to bind to the "Enabled" property, and not to the child support, but I cannot figure out how to do this.
I looked at some samples on mvvmcross and watched several N + 1 videos, but I cannot find a suitable match for the sample or another binding of the child property.
thanks
source share