public ExpenseDetailsPage(Expense selectedExpense) { InitializeComponent(); ViewModel = Resources["vm"] as ExpenseDetailsVM; ViewModel.SelectedExpense = selectedExpense; }
public ExpenseDetailsPage(Expense expense) { InitializeComponent(); ViewModel = Resources["vm"] as ExpenseDetailsVM; ViewModel.Expense = expense; }
public ExpenseDetailsPage(Expense expense) { InitializeComponent(); expenseDetailsVM = Resources["vm"] as ExpenseDetailsVM; expenseDetailsVM.Expense = expense; }
/// <summary> /// Second Contructor /// </summary> /// <param name="expense"></param> public ExpenseDetailsPage(Expense expense) { InitializeComponent(); //better to do this in xaml! using the bindingcontext attribute TheViewModel = Resources["vm"] as ExpenseDetailsVM; TheViewModel.Expense = expense; }