Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

181 lines (164 sloc) 11.703 kb
<common:LayoutAwarePage
x:Name="pageRoot"
x:Class="Crammer.ManageEntries"
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">
<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.RowDefinitions>
<RowDefinition Height="140"/>
<RowDefinition Height="80"/>
<RowDefinition Height="80"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ProgressRing Name="waitRing" IsActive="False" Width="50" Height="50" Foreground="Blue" />
<!-- Back button and page title -->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70"/>
<ColumnDefinition Width="280"/>
<ColumnDefinition Width="66"/>
<ColumnDefinition Width="66"/>
<ColumnDefinition Width="66"/>
<ColumnDefinition Width="66"/>
<ColumnDefinition Width="66"/>
<ColumnDefinition Width="66"/>
<ColumnDefinition Width="66"/>
<ColumnDefinition Width="160"/>
<ColumnDefinition Width="200*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!-- Button x:Name="backButton" Grid.Column="0" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}" Margin="10,0,0,40"/ -->
<Button x:Name="backButton" Grid.Column="0" Click="GoBack" Style="{StaticResource BackButtonStyle}" Margin="10,0,0,40"/>
<TextBlock x:Name="pageTitle" Grid.Column="1" Text="{StaticResource AppName}" Foreground="#FF063C93" FontSize="60" Margin="0,40" />
<Button x:Name="save" Content="&#xE105;" IsEnabled="False" FontFamily="Segoe UI Symbol" FontSize="25" Width="60" Height="60" Background="#FF063C93" Foreground="White" FontWeight="Bold" Click="save_Click_1" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,50,2,30" ToolTipService.ToolTip="Save Changes"/>
<Button x:Name="sub" Content="&#xE106;" IsEnabled="False" FontFamily="Segoe UI Symbol" FontSize="25" Width="60" Height="60" Background="#FF063C93" Foreground="White" FontWeight="Bold" Click="sub_Click_1" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,50,2,30" ToolTipService.ToolTip="Delete Entry"/>
<Button x:Name="cancel" Content="&#xE10E;" IsEnabled="False" FontFamily="Segoe UI Symbol" FontSize="25" Width="60" Height="60" Background="#FF063C93" Foreground="White" FontWeight="Bold" Click="cancel_Click_1" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,50,2,30" ToolTipService.ToolTip="Undo and Clear Changes" />
<Button x:Name="showAll" Content="&#xE14C;" FontFamily="Segoe UI Symbol" FontSize="25" Width="60" Height="60" Background="#FF063C93" Foreground="White" FontWeight="Bold" Click="showAll_Click_1" Grid.Column="6" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,50,2,30" ToolTipService.ToolTip="Show All Entries" />
<Button x:Name="asc" Content="&#xE183;" FontFamily="Segoe UI Symbol" FontSize="25" Width="60" Height="60" Background="#FF063C93" Foreground="White" FontWeight="Bold" Click="asc_Click_1" Grid.Column="7" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,50,2,30" ToolTipService.ToolTip="Sort Ascending" />
<Button x:Name="desc" Content="&#xE118;" FontFamily="Segoe UI Symbol" FontSize="25" Width="60" Height="60" Background="#FF063C93" Foreground="White" FontWeight="Bold" Click="desc_Click_1" Grid.Column="8" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,50,2,30" ToolTipService.ToolTip="Sort Descending" />
<Grid Grid.Column="9">
<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="16"></TextBlock>
<TextBlock Text="Total Entries:" VerticalAlignment="Center" Grid.Row="3" Foreground="Black" FontWeight="Normal" HorizontalAlignment="Right" Margin="4" FontSize="16"></TextBlock>
</Grid>
<Grid Grid.Column="10">
<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="16"></TextBlock>
<TextBlock Name="txtTotal" Text="" VerticalAlignment="Center" Grid.Row="3" Foreground="Black" FontWeight="Bold" HorizontalAlignment="Left" Margin="4" FontSize="16"></TextBlock>
</Grid>
</Grid>
<Grid Grid.Row="1" Background="#FF063C93" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="233*"/>
<ColumnDefinition Width="933*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Question:" FontSize="30" HorizontalAlignment="Right" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" Height="36" />
<TextBox x:Name="txtA" Grid.Column="1" Text="" IsTabStop="True" HorizontalAlignment="Stretch" Margin="8" VerticalAlignment="Stretch" Foreground="Black" TextChanged="txtA_TextChanged" FontSize="20" ToolTipService.ToolTip="Type in a New Question or Search for Existing" />
</Grid>
<Grid Grid.Row="2" Background="#FF063C93" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="233*"/>
<ColumnDefinition Width="933*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Answer:" FontSize="30" HorizontalAlignment="Right" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" Height="36" />
<TextBox x:Name="txtB" Grid.Column="1" Text="" IsTabStop="True" HorizontalAlignment="Stretch" Margin="8" VerticalAlignment="Stretch" Foreground="Black" FontSize="20" ToolTipService.ToolTip="Type in an Answer Value" />
</Grid>
<!-- ListView Name="listEntries" HorizontalAlignment="Stretch" Margin="8" Grid.Row="3" VerticalAlignment="Stretch" FontSize="40" FontWeight="Bold" >
</ListView -->
<!-- GridView ItemsSource="{Binding Source={StaticResource dictEntries}}" Margin="0,120,0,0" MaxHeight="500" Grid.Row="3" -->
<GridView Name="listEntries" ItemsSource="{Binding}" Margin="2" Grid.Row="3" DoubleTapped="listEntries_DoubleTapped" Tapped="listEntries_Tapped">
<GridView.ItemTemplate>
<DataTemplate>
<StackPanel Margin="20" Orientation="Vertical">
<TextBlock Name="A" Text="{Binding AEntry}" FontWeight="Bold" FontSize="25" Style="{StaticResource ItemTextStyle}"/>
<TextBlock Name="B" Text="{Binding BEntry}" TextWrapping="NoWrap" FontSize="25" Style="{StaticResource BodyTextStyle}" />
</StackPanel>
</DataTemplate>
</GridView.ItemTemplate>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<GridView.GroupStyle>
<GroupStyle HidesIfEmpty="True">
<GroupStyle.HeaderTemplate>
<DataTemplate>
<Grid Background="LightGray" Margin="0">
<TextBlock Text='{Binding Name}'
Foreground="Black" Margin="30"
Style="{StaticResource HeaderTextStyle}"/>
</Grid>
</DataTemplate>
</GroupStyle.HeaderTemplate>
<GroupStyle.ContainerStyle>
<Style TargetType="GroupItem">
<Setter Property="MinWidth" Value="600"/>
<Setter Property="BorderBrush" Value="DarkGray"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Margin" Value="3,0"/>
</Style>
</GroupStyle.ContainerStyle>
<GroupStyle.Panel>
<ItemsPanelTemplate>
<VariableSizedWrapGrid/>
</ItemsPanelTemplate>
</GroupStyle.Panel>
</GroupStyle>
</GridView.GroupStyle>
</GridView>
<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">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<!-- The back button and title have different styles when snapped -->
<VisualState x:Name="Snapped">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</common:LayoutAwarePage>
Jump to Line
Something went wrong with that request. Please try again.