Beispiel #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //this.View.BackgroundColor = UIColor.Black;

            _activityView = new UIActivityIndicatorView(this.View.Frame);
            //Add(_activityView);
            //View.BringSubviewToFront(_activityView);

            _tableView = new FoldingTableViewController(new System.Drawing.RectangleF(0, 0, 320, 367), UITableViewStyle.Plain);
            var source = new TableSource(_tableView.TableView);

            this.AddBindings(new Dictionary <object, string>()
            {
                { source, "ItemsSource TweetsPlus" },
                //{_activityView, "{'Hidden':{'Path':'IsSearching','Converter':'InvertedVisibility'}}"},
                { _tableView, "Refreshing IsSearching;RefreshHeadCommand RefreshCommand;LastUpdatedText WhenLastUpdatedUtc,Converter=SimpleDate" },
            });

            _tableView.TableView.RowHeight = 100;
            _tableView.TableView.Source    = source;
            _tableView.TableView.ReloadData();
            this.Add(_tableView.View);


            NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Tweet", UIBarButtonItemStyle.Bordered, (sender, e) => ViewModel.DoShareGeneral()), false);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //this.View.BackgroundColor = UIColor.Black;

            _activityView = new UIActivityIndicatorView(this.View.Frame);
            //Add(_activityView);
            //View.BringSubviewToFront(_activityView);

            _tableView = new FoldingTableViewController(new System.Drawing.RectangleF(0, 0, 320, 367), UITableViewStyle.Plain);
            var source = new TableSource(_tableView.TableView);

            this.AddBindings(new Dictionary<object, string>()
                                 {
                                     {source, "ItemsSource TweetsPlus"},
                                     //{_activityView, "{'Hidden':{'Path':'IsSearching','Converter':'InvertedVisibility'}}"},
				{_tableView, "Refreshing IsSearching;RefreshHeadCommand RefreshCommand;LastUpdatedText WhenLastUpdatedUtc,Converter=SimpleDate"},
                                 });

            _tableView.TableView.RowHeight = 100;
            _tableView.TableView.Source = source;
            _tableView.TableView.ReloadData();
            this.Add(_tableView.View);

            NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Tweet", UIBarButtonItemStyle.Bordered, (sender, e) => ViewModel.DoShareGeneral()), false);
        }
Beispiel #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //this.View.BackgroundColor = UIColor.Black;

            _activityView = new UIActivityIndicatorView(this.View.Frame);
            //Add(_activityView);
            //View.BringSubviewToFront(_activityView);

            _tableView = new FoldingTableViewController(new System.Drawing.RectangleF(0, 0, 320, 367), UITableViewStyle.Plain);
            var source = new MvxActionBasedBindableTableViewSource(
                _tableView.TableView,
                UITableViewCellStyle.Default,
                TweetCell.Identifier,
                TweetCell.CellBindingText,
                UITableViewCellAccessory.None);

            source.CellModifier = (cell) =>
            {
                cell.Image.DefaultImagePath = "Images/Icons/50_icon.png";
            };
            source.CellCreator = (tableView, indexPath, item) =>
            {
                return(TweetCell3.LoadFromNib(_tableView));
            };
            this.AddBindings(new Dictionary <object, string>()
            {
                { source, "{'ItemsSource':{'Path':'TweetsPlus'}}" },
                //{_activityView, "{'Hidden':{'Path':'IsSearching','Converter':'InvertedVisibility'}}"},
                { _tableView, "{'Refreshing':{'Path':'IsSearching'},'RefreshHeadCommand':{'Path':'RefreshCommand'},'LastUpdatedText':{'Path':'WhenLastUpdatedUtc','Converter':'SimpleDate'}}" },
            });

            _tableView.TableView.RowHeight = 100;
            _tableView.TableView.Source    = source;
            _tableView.TableView.ReloadData();
            this.Add(_tableView.View);


            NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Tweet", UIBarButtonItemStyle.Bordered, (sender, e) => ViewModel.ShareGeneralCommand.Execute()), false);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var foldingTvc = new FoldingTableViewController(TableViewHolder.Frame, UITableViewStyle.Grouped);

            // Perform any additional setup after loading the view, typically from a nib.
            var tableSource = new TableViewSource(foldingTvc.TableView);

            this.AddBindings(
                new Dictionary <object, string>()
            {
                { tableSource, "ItemsSource Emails" },
                { foldingTvc, "RefreshHeadCommand RefreshHeadCommand; Refreshing IsRefreshingHead" },
                { NumberOfEmailsLabel, "Text Emails.Count" }
            });

            foldingTvc.TableView.Source = tableSource;
            foldingTvc.TableView.ReloadData();
            foldingTvc.TableView.RowHeight = 100.0f;

            Add(foldingTvc.View);
        }