Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
181 lines (167 sloc) 12 KB
<common:LayoutAwarePage
x:Name="pageRoot"
x:Class="Crammer.MainPage"
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Crammer"
xmlns:common="using:Crammer.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Loaded="pageRoot_Loaded" Unloaded="pageRoot_Unloaded">
<Page.Resources>
<!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
<x:String x:Key="AppName">Crammer</x:String>
</Page.Resources>
<!--
This grid acts as a root panel for the page that defines two rows:
* Row 0 contains the back button and page title
* Row 1 contains the rest of the page layout
-->
<!-- Grid Style="{StaticResource LayoutRootStyle}" -->
<Grid Style="{StaticResource LayoutRootStyle}">
<Grid.RowDefinitions>
<RowDefinition Height="140"/>
<RowDefinition Height="515*"/>
</Grid.RowDefinitions>
<!-- Back button and page title -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="110"/>
<ColumnDefinition Width="251*"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="605*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="pageTitle" Grid.Column="0" Margin="22,1,1,1" Grid.ColumnSpan="3" Text="{StaticResource AppName}" Foreground="#FF063C93" Height="60" FontSize="60" />
<TextBlock Grid.Column="0" Text="Smart Memorizer" Grid.ColumnSpan="3" Margin="28,1,1,1" FontSize="20" Foreground="#FF04388B" VerticalAlignment="Bottom" Height="24"/>
<Grid Grid.Column="3">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Dictionary Title:" VerticalAlignment="Center" Grid.Row="2" Foreground="Black" FontWeight="Normal" HorizontalAlignment="Right" Margin="4" FontSize="20"></TextBlock>
<TextBlock Text="Total Entries:" VerticalAlignment="Center" Grid.Row="3" Foreground="Black" FontWeight="Normal" HorizontalAlignment="Right" Margin="4" FontSize="20"></TextBlock>
<TextBlock Text="Active Entries:" VerticalAlignment="Center" Grid.Row="4" Foreground="Black" FontWeight="Normal" HorizontalAlignment="Right" Margin="4" FontSize="20"></TextBlock>
</Grid>
<Grid Grid.Column="4">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Name="txtDictionaryTitle" Text="" VerticalAlignment="Center" Grid.Row="2" Foreground="Black" FontWeight="Bold" HorizontalAlignment="Left" Margin="4" FontSize="20"></TextBlock>
<TextBlock Name="txtTotal" Text="" VerticalAlignment="Center" Grid.Row="3" Foreground="Black" FontWeight="Bold" HorizontalAlignment="Left" Margin="4" FontSize="20"></TextBlock>
<TextBlock Name="txtActive" Text="" VerticalAlignment="Center" Grid.Row="4" Foreground="Black" FontWeight="Bold" HorizontalAlignment="Left" Margin="4" FontSize="20"></TextBlock>
</Grid>
</Grid>
<Grid Grid.Row="1" Margin="10, 10, 10, 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="284*"/>
<ColumnDefinition Width="770*"/>
<ColumnDefinition Width="284*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="10,10,10,10" Background="#0A4BB3">
<Grid.RowDefinitions>
<RowDefinition Height="37*"/>
<RowDefinition Height="52*"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="50*"/>
</Grid.RowDefinitions>
<TextBlock Text="Dictionary" VerticalAlignment="Center" Grid.Row="1" Foreground="White" HorizontalAlignment="Left" Margin="40,0,0,0" FontSize="40"></TextBlock>
<ContentControl Name="menuNewDict" Content="New..." FontSize="28" Foreground="White" HorizontalAlignment="Left" Margin="80,10,0,4" Grid.Row="2" VerticalAlignment="Center" Height="41" Width="109" Tapped="menuNewDict_Tapped_1" />
<ContentControl Name="menuOpenDict" Content="Open..." FontSize="28" Foreground="White" HorizontalAlignment="Left" Margin="80,10,0,4" Grid.Row="3" VerticalAlignment="Center" Height="41" Width="109" Tapped="menuOpenDict_Tapped_1" />
<ContentControl Name="menuEditDict" Content="Edit..." FontSize="28" Foreground="White" HorizontalAlignment="Left" Margin="80,10,0,4" Grid.Row="4" VerticalAlignment="Center" Height="41" Width="109" Tapped="menuEditDict_Tapped_1" />
<ContentControl Name="menuFlipSequence" Content="Switch Order" FontSize="28" Foreground="White" HorizontalAlignment="Left" Grid.Row="6" VerticalAlignment="Center" Height="41" Width="162" Tapped="menuFlipSequence_Tapped_1" Margin="80,6,0,45" Grid.RowSpan="2" />
<ContentControl Name="menuStartOver" Content="Start Over" FontSize="28" Foreground="White" HorizontalAlignment="Left" Grid.Row="7" VerticalAlignment="Center" Height="41" Width="156" Tapped="menuStartOver_Tapped_1" Margin="80,6,0,45" Grid.RowSpan="2" />
</Grid>
<Border Grid.Column="1" BorderBrush="DarkGray" BorderThickness="2" Margin="10,10,10,10">
<Grid Name="GridOutput" Grid.Column="1" Background="White" Margin="10,10,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="133*"/>
<RowDefinition Height="24*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0"
BorderBrush="#FF8B8787"
BorderThickness="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0A4BB3"/>
<GradientStop Color="White" Offset="1"/>
<GradientStop Color="#FF8BA2E2" Offset="0.251"/>
<GradientStop Color="#FEAEC1F3" Offset="0.488"/>
<GradientStop Color="#FECBD5F3" Offset="0.753"/>
</LinearGradientBrush>
</Border.Background>
<TextBlock Margin="10" Name="txtOut" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" FontSize="55" FontWeight="Bold" Foreground="{x:Null}" />
</Border>
<Grid Grid.Row="1" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*"/>
<ColumnDefinition Width="50*"/>
<ColumnDefinition Width="50*"/>
</Grid.ColumnDefinitions>
<Button Content="Don't Know" x:Name="cmdNo" Background="#0A4BB3" Foreground="White" Grid.Column="0" FontSize="28" HorizontalAlignment="Right" Margin="5" VerticalAlignment="Center" Height="70" Width="180" Click="cmdNo_Click_1" RenderTransformOrigin="0.5,0.5" />
<Button Content="Verify" x:Name="cmdVerify" Background="#0A4BB3" Foreground="White" Grid.Column="1" FontSize="28" HorizontalAlignment="Center" Margin="5" VerticalAlignment="Center" Height="70" Width="180" Click="cmdVerify_Click_1" />
<Button Content="OK" x:Name="cmdYes" Background="#0A4BB3" Foreground="White" Grid.Column="2" FontSize="28" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Center" Height="70" Width="180" Click="cmdYes_Click_1" />
</Grid>
</Grid>
</Border>
<Grid Grid.Row="1" Grid.Column="2" Margin="10, 10, 10, 10" Background="#0A4BB3">
<Grid.RowDefinitions>
<RowDefinition Height="37*"/>
<RowDefinition Height="52*"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="46"/>
<RowDefinition Height="38*"/>
</Grid.RowDefinitions>
<TextBlock Text="Sorting" VerticalAlignment="Center" Grid.Row="1" Foreground="White" HorizontalAlignment="Left" FontSize="40" Height="54" Width="129" Margin="30,19"/>
<ContentControl Name="menuShuffle" Content="Shuffle" FontSize="28" Foreground="White" HorizontalAlignment="Left" Grid.Row="2" VerticalAlignment="Center" Height="41" Width="224" Tapped="menuShuffle_Tapped_1" Margin="45,3,0,0" />
<ContentControl Name="menuSortAsc" Content="Ascending" FontSize="28" Foreground="White" HorizontalAlignment="Left" Grid.Row="3" VerticalAlignment="Center" Height="41" Width="224" Tapped="menuSortAsc_Tapped_1" Margin="45,3,0,0" />
<ContentControl Name="menuSortDesc" Content="Descending" FontSize="28" Foreground="White" HorizontalAlignment="Left" Grid.Row="4" VerticalAlignment="Center" Height="41" Width="224" Tapped="menuSortDesc_Tapped_1" Margin="45,3,0,0" />
<ContentControl Name="menuTimeAscending" Content="Time Ascending" FontSize="28" Foreground="White" HorizontalAlignment="Left" Grid.Row="5" VerticalAlignment="Center" Height="41" Width="224" Tapped="menuTimeAscending_Tapped_1" Margin="45,3,0,0" />
<ContentControl Name="menuTimeDescending" Content="Time Descending" FontSize="28" Foreground="White" HorizontalAlignment="Left" Grid.Row="6" VerticalAlignment="Center" Height="41" Width="224" Tapped="menuTimeDescending_Tapped_1" Margin="45,3,0,0" />
</Grid>
</Grid>
<!-- Popup Name="popupMessage" Width="200" Height="100">
<StackPanel>
<TextBlock Name="Msg" Text=""></TextBlock>
</StackPanel>
</Popup -->
<VisualStateManager.VisualStateGroups>
<!-- Visual states reflect the application's view state -->
<VisualStateGroup x:Name="ApplicationViewStates">
<VisualState x:Name="FullScreenLandscape"/>
<VisualState x:Name="Filled"/>
<!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
<VisualState x:Name="FullScreenPortrait"/>
<!-- The back button and title have different styles when snapped -->
<VisualState x:Name="Snapped">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</common:LayoutAwarePage>