/// <summary> /// Navigates to the specified page. /// </summary> /// <param name="page">The page to go to.</param> /// <param name="viewModel">The view model, if any, ti set explicitly to the new page.</param> public void GoToPage(ApplicationPage page, BaseViewModel viewModel = null) { // Set the view model. CurrentPageViewModel = viewModel; // Set the current page. CurrentPage = page; // Fire off a CurrentPage chaned event. OnPropertyChanged(nameof(CurrentPage)); // Set window title page name. if ((int)page < LoadBackPageValueLimit) { SetWindowTitlePostfixOnly = (int)page > 0 ? page.GetDescription() : ""; } }