public override void ViewDidLoad() { base.ViewDidLoad(); BackButton.SetCommand(ViewModel.BackCommand); BackButton.SetTitle(ViewModel.BackText, UIControlState.Normal); }
public override void ViewDidLoad() { base.ViewDidLoad(); View.BackgroundColor = UIColor.Brown; /* * BackButton.TouchUpInside += (s, e) => * { * var nav = SimpleIoc.Default.GetInstance<IViewNavigationService>(); * nav.GoBack(); * }; */ // Binding and commanding // Binding between the first UILabel and the NativeTitle property on the VM. // Keep track of the binding to avoid premature garbage collection bindings.Add( this.SetBinding( () => Vm.NativeTitle, () => NativeTitle.Text)); // Actuate the Command on the VM. BackButton.SetCommand( "TouchUpInside", Vm.NavigateBackCommand); }