public ExpensesPage()
        {
            Title            = "Despesas";
            Items            = new ObservableRangeCollection <Expense>();
            LoadItemsCommand = new Command(async() => await ExecuteLoadItemsCommand());
            RefreshCommand   = new Command(Load);
            _service         = new ExpensesAzureRest();

            MessagingCenter.Subscribe <NewExpansePage, Expense>(this, "AddExpense", async(obj, item) =>
            {
                Items.Add(item);
                await DataStore.AddItemAsync(item);
            });
        }
Ejemplo n.º 2
0
 public ExpenseVm()
 {
     NewExpenseCommand = new Command(AddExpense);
     _service          = new ExpensesAzureRest();
 }