Example #1
0
        // Navegación a la página CrearContacto

        private void botonCrear(object sender, RoutedEventArgs e)
        {
            Button b = (Button)sender;

            if (b != null)
            {
                CrearContacto cc = new CrearContacto(c);

                if (this.Background.ToString().Equals(night.ToString()))
                {
                    cc = aparienciaNight(cc);
                }
                if (this.Background.ToString().Equals(light.ToString()))
                {
                    cc = aparienciaLight(cc);
                }

                this.Content = NavigationService.Navigate(cc);
            }
        }
Example #2
0
        private CrearContacto aparienciaLight(CrearContacto cc)
        {
            cc.Background = light;
            cc.Foreground = night;
            cc.CreaContacto.Foreground      = night;
            cc.Nombre.Background            = light;
            cc.Nombre.BorderBrush           = night;
            cc.Nombre.Foreground            = night;
            cc.NombreWM.Background          = light;
            cc.NombreWM.BorderBrush         = night;
            cc.NombreWM.Foreground          = night;
            cc.PuntoRojoNombre.Background   = light;
            cc.Apellido.Background          = light;
            cc.Apellido.BorderBrush         = night;
            cc.Apellido.Foreground          = night;
            cc.ApellidoWM.Background        = light;
            cc.ApellidoWM.BorderBrush       = night;
            cc.ApellidoWM.Foreground        = night;
            cc.Telefono1.Background         = light;
            cc.Telefono1.BorderBrush        = night;
            cc.Telefono1.Foreground         = night;
            cc.Telefono1WM.Background       = light;
            cc.Telefono1WM.BorderBrush      = night;
            cc.Telefono1WM.Foreground       = night;
            cc.PuntoRojoTelefono.Background = light;
            cc.Telefono2.Background         = light;
            cc.Telefono2.BorderBrush        = night;
            cc.Telefono2.Foreground         = night;
            cc.Telefono2WM.Background       = light;
            cc.Telefono2WM.BorderBrush      = night;
            cc.Telefono2WM.Foreground       = night;
            cc.Direccion.Background         = light;
            cc.Direccion.BorderBrush        = night;
            cc.Direccion.Foreground         = night;
            cc.DireccionWM.Background       = light;
            cc.DireccionWM.BorderBrush      = night;
            cc.DireccionWM.Foreground       = night;
            cc.email.Background             = light;
            cc.email.BorderBrush            = night;
            cc.email.Foreground             = night;
            cc.emailWM.Background           = light;
            cc.emailWM.BorderBrush          = night;
            cc.emailWM.Foreground           = night;
            cc.FechaNacimiento.Background   = light;
            cc.FechaNacimiento.BorderBrush  = night;
            cc.FechaNacimiento.Foreground   = night;
            cc.Aceptar.Background           = light;
            cc.Aceptar.BorderBrush          = night;
            cc.Aceptar.Foreground           = night;
            cc.Cancelar.Background          = light;
            cc.Cancelar.BorderBrush         = night;
            cc.Cancelar.Foreground          = night;
            cc.CirculoColor.Stroke          = night;
            cc.Azul.BorderBrush             = night;
            cc.Verde.BorderBrush            = night;
            cc.Rojo.BorderBrush             = night;
            cc.Amarillo.BorderBrush         = night;
            cc.Rosa.BorderBrush             = night;
            cc.Lila.BorderBrush             = night;
            cc.Gris.BorderBrush             = night;
            cc.Marrón.BorderBrush           = night;
            cc.Negro.BorderBrush            = night;

            string converted  = String.Format("pack://application:,,,/imagenes/camara.png");
            string converted2 = String.Format("pack://application:,,,/imagenes/telefono.png");
            string converted3 = String.Format("pack://application:,,,/imagenes/calendario.png");
            string converted4 = String.Format("pack://application:,,,/imagenes/casa.png");
            string converted5 = String.Format("pack://application:,,,/imagenes/cerrar.png");

            cc.Imagen.Source      = new BitmapImage(new Uri(converted, UriKind.Absolute));
            cc.Ring.Source        = new BitmapImage(new Uri(converted2, UriKind.Absolute));
            cc.Calendario.Source  = new BitmapImage(new Uri(converted3, UriKind.Absolute));
            cc.Casa.Source        = new BitmapImage(new Uri(converted4, UriKind.Absolute));
            cc.FechaBasura.Source = new BitmapImage(new Uri(converted5, UriKind.Absolute));

            cc.simbol.Foreground = night;

            return(cc);
        }