1: <common:LayoutAwarePage
2: x:Name="pageRoot"
3: x:Class="Sample2.BasicPage1"
4: DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
5: IsTabStop="false"
6: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
7: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
8: xmlns:local="using:Sample2"
9: xmlns:common="using:Sample2.Common"
10: xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
11: xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
12: mc:Ignorable="d">
13:
14: <Page.Resources>
15: <x:String x:Key="AppName">My Application</x:String>
16: </Page.Resources>
17:
18: <Grid Style="{StaticResource LayoutRootStyle}">
19: <Grid.RowDefinitions>
20: <RowDefinition Height="140"/>
21: <RowDefinition Height="*"/>
22: </Grid.RowDefinitions>
23:
24: <Grid>
25: <Grid.ColumnDefinitions>
26: <ColumnDefinition Width="Auto"/>
27: <ColumnDefinition Width="*"/>
28: </Grid.ColumnDefinitions>
29: <Button x:Name="backButton" Click="GoBack"
30: IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}"
31: Style="{StaticResource BackButtonStyle}"/>
32: <TextBlock x:Name="pageTitle" Grid.Column="1" Text="Seleccione un planeta"
33: Style="{StaticResource PageHeaderTextStyle}"/>
34: </Grid>
35: <TextBlock HorizontalAlignment="Left" Margin="60,40,0,0" Grid.Row="1"
36: TextWrapping="Wrap" Text="Listado de planetas:" VerticalAlignment="Top"
37: FontSize="20" Foreground="LightCyan" />
38: <ComboBox x:Name="cboPlanetas" HorizontalAlignment="Left" Margin="60,80,0,0"
39: Grid.Row="1" VerticalAlignment="Top" Width="180" FontSize="16"
40: SelectionChanged="cboPlanetas_SelectionChanged_1" ItemsSource="{Binding}" />
41:
42: <VisualStateManager.VisualStateGroups>
43:
44: <VisualStateGroup x:Name="ApplicationViewStates">
45: <VisualState x:Name="FullScreenLandscape"/>
46: <VisualState x:Name="Filled"/>
47:
48: <VisualState x:Name="FullScreenPortrait">
49: <Storyboard>
50: <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton"
51: Storyboard.TargetProperty="Style">
52: <DiscreteObjectKeyFrame KeyTime="0"
53: Value="{StaticResource PortraitBackButtonStyle}"/>
54: </ObjectAnimationUsingKeyFrames>
55: </Storyboard>
56: </VisualState>
57:
58: <VisualState x:Name="Snapped">
59: <Storyboard>
60: <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton"
61: Storyboard.TargetProperty="Style">
62: <DiscreteObjectKeyFrame KeyTime="0"
63: Value="{StaticResource SnappedBackButtonStyle}"/>
64: </ObjectAnimationUsingKeyFrames>
65: <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle"
66: Storyboard.TargetProperty="Style">
67: <DiscreteObjectKeyFrame KeyTime="0"
68: Value="{StaticResource SnappedPageHeaderTextStyle}"/>
69: </ObjectAnimationUsingKeyFrames>
70: </Storyboard>
71: </VisualState>
72: </VisualStateGroup>
73: </VisualStateManager.VisualStateGroups>
74: </Grid>
75: </common:LayoutAwarePage>