public AppShellViewModel() { _toggleHamburgerCommand = new RelayCommand(ToggleHamburgerMenuCommandExecute); _paneItemSelectedCommand = new RelayCommand(PaneItemSelectedCommandExecute); _hamburgerShowing = false; _currentPage = MainContentPageType.Unset; _currentPageTitle = "Loading..."; }
private void NavigateToPage(MainContentPageType page) { switch (page) { case MainContentPageType.Financial: _mainContentFrame?.Navigate(typeof(FinancialNewsPage)); CurrentPageTitle = "Financial"; break; case MainContentPageType.Food: _mainContentFrame.Navigate(typeof(FoodNewsPage)); CurrentPageTitle = "Food"; break; } }
public void RegisterContentFrame(Frame frame) { _mainContentFrame = frame; CurrentPage = MainContentPageType.Financial; }
private void PaneItemSelectedCommandExecute(object obj) { Contract.Assert(obj != null, "Cannot execute command with no parameter"); MainContentPageType selectedType = (MainContentPageType)obj; CurrentPage = selectedType; }