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

            AddRecordButton.SetCommand(_summaryViewModel.AddRecordButtonAction);

            WidgetsCollectionView.BackgroundColor = UIColor.Brown;

            WidgetsCollectionView.RegisterNibForCell(BalanceWidget.Nib, BalanceWidget.Key);
            WidgetsCollectionView.RegisterNibForCell(AccountsWidgetCell.Nib, AccountsWidgetCell.Key);
            WidgetsCollectionView.RegisterNibForCell(TransactionsWidget.Nib, TransactionsWidget.Key);

            WidgetsCollectionView.Source   = new SummaryCollectionViewSource(_balanceWidgetViewModel, _accountsWidgetViewModel, _transactionsWidgetViewModel);
            WidgetsCollectionView.Delegate = new SummaryCollectionViewLayoutDelegate(_accountsWidgetViewModel, _transactionsWidgetViewModel);
            WidgetsCollectionView.SetCollectionViewLayout(WidgetsCollectionViewFlowLayout, false);
        }
Exemplo n.º 2
0
 //TODO: Unsubscribe
 private void TransactionsChanged(object sender, EventArgs e)
 {
     WidgetsCollectionView.ReloadItems(new[] { NSIndexPath.FromRowSection(1, 0) });
 }
Exemplo n.º 3
0
 //TODO: Unsubscribe
 private void AccountsCollectionChanged(object sender, EventArgs e)
 {
     WidgetsCollectionView.ReloadItems(new[] { NSIndexPath.FromRowSection(0, 0) });
 }