37
LABORATORIO DE WINDOWS PHONE

Windows Phone 7 Navegación

Embed Size (px)

DESCRIPTION

Este es un ejemplo práctico de cómo realizar navegación entre páginas.

Citation preview

Page 1: Windows Phone 7 Navegación

LABORATORIO DE WINDOWS PHONE

Page 2: Windows Phone 7 Navegación

Microsoft Student Partners

Page 3: Windows Phone 7 Navegación

WINDOWS PHONE

Page 4: Windows Phone 7 Navegación

COMPONENETES DE INTERFAZ ÚNICO

Lock Screen Start Screen List View Theme Screen

Page 5: Windows Phone 7 Navegación

Ejercicio: Convertidor de Unidades

Page 6: Windows Phone 7 Navegación

Ejercicio

• Crear un Nuevo Proyecto.• Comprender:

– Navegación.– Navegación.– Controles.– Funcionalidad.– Personalización.

Page 7: Windows Phone 7 Navegación

Nuevo Proyecto

• Crear nuevo Proyecto en Visual Studio para Windows Phone

Page 8: Windows Phone 7 Navegación

Crear Proyecto

Page 9: Windows Phone 7 Navegación

Crear Proyecto

Page 10: Windows Phone 7 Navegación

Crear Proyecto

Page 11: Windows Phone 7 Navegación

Crear Proyecto

Page 12: Windows Phone 7 Navegación

Crear Proyecto

• Cambiar el Nombre de la App

Page 13: Windows Phone 7 Navegación

Navegación

• Creamos una nueva página

Page 14: Windows Phone 7 Navegación

Navegación

Page 15: Windows Phone 7 Navegación

Navegación

• Navegar con botones:

Page 16: Windows Phone 7 Navegación

Navegación• En el botón de la página principal:private void button1_Click(object sender, RoutedEventArgs e){

NavigationService.Navigate(new Uri("/SegundaPagina.xaml",UriKind.RelativeOrAbsolute));}

Page 17: Windows Phone 7 Navegación

Navegación• En el botón de la segunda página:private void button1_Click(object sender, RoutedEventArgs e)

{if (NavigationService.CanGoBack){

NavigationService.GoBack();}

}

Page 18: Windows Phone 7 Navegación

Prueba la Navegación

Page 19: Windows Phone 7 Navegación

Controles

• Grid• Textblock• Textbox• Buton• Buton

Page 20: Windows Phone 7 Navegación

Controles - Grid

Page 21: Windows Phone 7 Navegación

Controles - Grid

Page 22: Windows Phone 7 Navegación

Controles - Grid

Page 23: Windows Phone 7 Navegación

Controles -Grid

Page 24: Windows Phone 7 Navegación

Controles - Grid

Page 25: Windows Phone 7 Navegación

Controles - TextBlock

• Porque el primer TextBlock no tiene Grid.Row?

Page 26: Windows Phone 7 Navegación

Controles - TextBlock

Page 27: Windows Phone 7 Navegación

Controles - TextBox

Page 28: Windows Phone 7 Navegación

Controles - TextBox

Borrar las propiedades Text

Page 29: Windows Phone 7 Navegación

Controles - TextBlock

Page 30: Windows Phone 7 Navegación

Controles - Button

Page 31: Windows Phone 7 Navegación

Controles - Button

• Ajusta la Fila al Botón

Page 32: Windows Phone 7 Navegación

Funcionalidad

Agregar la lógica necesaria al boton“Convertir”:

• Crear el evento Click del botón:

Page 33: Windows Phone 7 Navegación

Funcionalidad

• Realizar el Calculo de la Conversión de acuerdo a la regla:1Km = 0.62 Mi => 1Km ……… 0.62 Mi

xKm……… ? = xKm* 0.62Mi = x * 0.62 Mi

1Km

• Agregar el Código en el Evento:private void button2_Click(object sender, RoutedEventArgs e)

{ textBox2.Text = (Double.Parse(textBox1.Text) * 0.62).ToString();

}

Page 34: Windows Phone 7 Navegación

Prueba la Aplicación

Page 35: Windows Phone 7 Navegación

Personalización

Mediante:• Propiedades y Valores en Visual Studio.• Expression Blend.

Page 36: Windows Phone 7 Navegación
Page 37: Windows Phone 7 Navegación

Personaliza tu Aplicación:

• Cambia las Imágenes:• Cambia las Imágenes:• ApplicationIcon.png• Background.png• SplashScreenImage.jpg

• Nombre de la Aplicación.• Cambiar las unidades a convertir.• Cambia los colores , los fondos, los

tamaños de letras y lo que te guste para ponerle tu toque personal.

Sube tu App a Yallapps