Пример #1
0
        private void InitBarButtons()
        {
            var uploadButton = new UIBarButtonItem(UIBarButtonSystemItem.Refresh);

            uploadButton.Clicked += delegate { ViewModel.UploadUsesСommand.Execute(null); };
            NavigationItem?.SetRightBarButtonItem(uploadButton, true);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            RemoveTableViewSeparator(tv_choose_people1);

            var source = new ChoosePeopleTableSource(tv_choose_people1);

            tv_choose_people1.Source = source;

            var bindingSet = this.CreateBindingSet <ChoosePeopleViewController, ChoosePeopleViewModel>();

            bindingSet.Bind(l_choose_people_available).To(vm => vm.AvailablePeopleCount).WithConversion("AvailablePeople");
            bindingSet.Bind(source).To(vm => vm.Employees);
            bindingSet.Bind(btn_choose_people_continue).To(vm => vm.CreateShiftCommand);
            bindingSet.Bind(btn_choose_people_all).To(vm => vm.SelectAllAvailableCommand);
            bindingSet.Bind(l_choose_people_selected).To(vm => vm.SelectedPeopleCountDisplay);
            bindingSet.Bind(btn_choose_people_continue).For(Constants.VISIBILITY).To(vm => vm.AreEnoughPeopleSelected)
            .WithConversion(Constants.VISIBILITY);

            bindingSet.Apply();

            tv_choose_people1.ReloadData();

            NavigationItem?.SetRightBarButtonItem(new UIBarButtonItem(UIBarButtonSystemItem.Cancel, CancelCreateShift), true);
        }
Пример #3
0
 protected void Initialize()
 {
     NavigationItem.SetRightBarButtonItem(new UIBarButtonItem(UIBarButtonSystemItem.Add), false);
     NavigationItem.RightBarButtonItem.Clicked += (sender, e) => { ShowTaskDetails(new Task()); };
 }
 private void DoneBarButtonItemClicked(object sender, EventArgs e)
 {
     // Dismiss the keyboard by removing it as the first responder.
     TextView.ResignFirstResponder();
     NavigationItem.SetRightBarButtonItem(null, animated: true);
 }