Esempio n. 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            TitleLabel.Text = Resources.DateFormat;

            var source = new DateFormatsTableViewSource(DateFormatsTableView, ViewModel.DateTimeFormats);

            DateFormatsTableView.Source = source;

            source.DateFormatSelected
            .Subscribe(ViewModel.SelectDateFormat.Inputs)
            .DisposedBy(disposeBag);

            BackButton.Rx()
            .BindAction(ViewModel.Close)
            .DisposedBy(disposeBag);
        }
Esempio n. 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var source = new DateFormatsTableViewSource(DateFormatsTableView);

            DateFormatsTableView.Source = source;

            var bindingSet = this.CreateBindingSet <SelectDateFormatViewController, SelectDateFormatViewModel>();

            bindingSet.Bind(source).To(vm => vm.DateTimeFormats);

            bindingSet.Bind(BackButton).To(vm => vm.CloseCommand);

            bindingSet.Bind(source)
            .For(v => v.SelectionChangedCommand)
            .To(vm => vm.SelectFormatCommand);

            bindingSet.Apply();
        }