public void Execute(object parameter) { if (CanExecute(parameter)) { PageNavigation.NavigateToPage(TargetPage, parameter); } }
private void LaunchMainPage() { var page = new HostPage { Language = ApplicationLanguages.Languages[0] }; // page.ContentFrame.NavigationFailed += OnNavigationFailed; if (ApplicationExecutionState.Terminated == PreviousExecutionState) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = page; // if (null == page.ContentFrame.Content) // { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter if (!PageNavigation.NavigateToPage(typeof(MainPage), LaunchArguments)) { throw new PageNavigationException(typeof(MainPage)); } // } }