コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            Vm.Init();

            AddButton = new UIBarButtonItem(UIBarButtonSystemItem.Add);
            NavigationItem.SetRightBarButtonItem(AddButton, false);
            AddButton.Clicked += (sender, args) => { };

            // bindings
            AddButton.SetCommand("Clicked", Vm.AddPersonCommand);
            _currentIndexBinding = this.SetBinding(
                () => CurrentIndex,
                () => Vm.CurrentIndex);

            source = Vm.People.GetTableViewSource(
                CreateTaskCell,
                BindTaskCell,
                factory: () => new PeopleListObservableTableSource());

            PeopleTableView.Source    = source;
            PeopleTableView.Delegate  = this;
            PeopleTableView.RowHeight = 185;
            PeopleTableView.ReloadData();


            // Add Important Message View
            var importantMessage      = ImportantMessageView.Create();
            var importantMessageFrame = new CGRect(0, 0, View.Frame.Width, 50);

            importantMessage.Frame = importantMessageFrame;
            View.AddSubview(importantMessage);
        }
コード例 #2
0
ファイル: PeopleListView.cs プロジェクト: manhnguyenv/People
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Title = "People#";

            var source = new MvxSimpleTableViewSource(this.PeopleTableView, PeopleRow.Key, PeopleRow.Key);

            this.AddBindings(new Dictionary <object, string>
            {
                { source, "ItemsSource Contacts" }
            });
            PeopleTableView.RowHeight = 80;
            PeopleTableView.Source    = source;
            PeopleTableView.ReloadData();
        }