public BankPage() { resources = ResourceLoader.GetForCurrentView(); InitializeComponent(); viewModel = new BankPageViewModel(new BankAccountInfoService(), new TransactionService(), new CategoryService(), ResourceLoader.GetForCurrentView()) { BeforeSync = () => { IconRotation.Begin(); TransactionsAccordion.UnselectAll(); }, AfterSync = () => { IconRotation.Stop(); RecalculateLineGraphInterval(); SetStyles(); } }; DataContext = viewModel; }
public WalletPage() { resources = ResourceLoader.GetForCurrentView(); InitializeComponent(); viewModel = new WalletPageViewModel(new BankAccountInfoService(), new TransactionService(), new CategoryService(), new WalletCategoryService(), new WalletBankService(), new CurrencyService(), ResourceLoader.GetForCurrentView()) { BeforeSync = () => { IconRotation.Begin(); TransactionsAccordion.UnselectAll(); }, AfterSync = () => { IconRotation.Stop(); RecalculateLineGraphInterval(); SetStyles(); } }; DataContext = viewModel; TimeRangeComboboxCat.ItemsSource = Enum.GetValues(typeof(TimeRange)).Cast <TimeRange>(); TimeRangeComboboxTrans.ItemsSource = Enum.GetValues(typeof(TimeRange)).Cast <TimeRange>(); }