private void GoToPage_Click(object sender, RoutedEventArgs e) { string page = (sender as Button).Name; switch (page) { case "GoToColorPage": ConfigFrame.Navigate(typeof(ColorPage), null, new SuppressNavigationTransitionInfo()); break; case "GoToAlarmPage": ConfigFrame.Navigate(typeof(AlarmPage), null, new SuppressNavigationTransitionInfo()); break; case "GoToAmbientLightPage": ConfigFrame.Navigate(typeof(AmbientLightPage), null, new SuppressNavigationTransitionInfo()); break; case "GoToTemperaturePage": ConfigFrame.Navigate(typeof(TemperaturePage), null, new SuppressNavigationTransitionInfo()); break; case "GoToDateTimePage": ConfigFrame.Navigate(typeof(DateTimePage), null, new SuppressNavigationTransitionInfo()); break; case "GoToResetPage": ConfigFrame.Navigate(typeof(ResetPage), null, new SuppressNavigationTransitionInfo()); break; case "GoToAutomatizationPage": ConfigFrame.Navigate(typeof(AutomatizationPage), null, new SuppressNavigationTransitionInfo()); break; } }
protected override void OnNavigatedTo(NavigationEventArgs e) { ConfigFrame.Navigate(typeof(MainConfigPage)); SetIcons(); MainPage.Current.StyleControls(); }