private PaginaPrincipal aparienciaLight(PaginaPrincipal pp) { pp.Foreground = night; pp.Lista.BorderBrush = night; pp.Lista.Foreground = night; pp.Configura.BorderBrush = night; pp.Configura.Foreground = night; pp.Exit.BorderBrush = night; pp.Exit.Foreground = night; string converted = String.Format("pack://application:,,,/imagenes/logo.png"); string converted2 = String.Format("pack://application:,,,/imagenes/agenda.png"); pp.Logo.Source = new BitmapImage(new Uri(converted, UriKind.Absolute)); pp.Agenda.Source = new BitmapImage(new Uri(converted2, UriKind.Absolute)); return(pp); }
// Botón Atrás para navegar a la página PaginaPrincipal private void botonAtras(object sender, RoutedEventArgs e) { System.Windows.Controls.Button b = (System.Windows.Controls.Button)sender; if (b != null) { PaginaPrincipal pp = new PaginaPrincipal(c); if (this.Background.ToString().Equals(night.ToString())) { pp = aparienciaNight(pp); } if (this.Background.ToString().Equals(light.ToString())) { pp = aparienciaLight(pp); } this.Content = NavigationService.Navigate(pp); } }