Created
June 2, 2015 16:17
-
-
Save BrianJVarley/d2317cc457e6a2ac99a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page x:Class="LC_Points.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:Core="using:Microsoft.Xaml.Interactions.Core" | |
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" | |
xmlns:Series="using:WinRTXamlToolkit.Controls.DataVisualization.Charting" | |
xmlns:charting="using:WinRTXamlToolkit.Controls.DataVisualization.Charting" | |
xmlns:controls="using:WinRTXamlToolkit.Controls" | |
xmlns:converter="using:LC_Points.Converter" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:datavis="using:WinRTXamlToolkit.Controls.DataVisualization" | |
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" | |
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" | |
xmlns:local="using:LC_Points" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" | |
mc:Ignorable="d"> | |
<Page.Resources> | |
<converter:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" /> | |
<converter:BoolToNonVisibilityConverter x:Key="BoolToNonVisibilityConverter" /> | |
</Page.Resources> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="40*" /> | |
<RowDefinition Height="20*" /> | |
<RowDefinition Height="30*" /> | |
<RowDefinition Height="30*" /> | |
<RowDefinition Height="20*" /> | |
<RowDefinition Height="20*" /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="4*" /> | |
<ColumnDefinition Width="3*" /> | |
</Grid.ColumnDefinitions> | |
<StackPanel x:Name="TitlePanel" | |
Grid.Row="0" | |
Margin="12,17,0,28"> | |
<TextBlock Style="{StaticResource SubheaderTextBlockStyle}" Text="LC POINTS" /> | |
<TextBlock Margin="9,-7,0,0" | |
Foreground="DarkGreen" | |
Style="{StaticResource HeaderTextBlockStyle}" | |
Text="Home" /> | |
</StackPanel> | |
<!-- TitlePanel contains the name of the application and page title --> | |
<ComboBox x:Name="subjectCmbBx" | |
Grid.Row="1" | |
Grid.ColumnSpan="2" | |
Width="199" | |
HorizontalAlignment="Left" | |
VerticalAlignment="Top" | |
DisplayMemberPath="Subject" | |
Header="Subjects" | |
ItemsSource="{Binding Subjects}" | |
PlaceholderText="Pick a subject" | |
SelectedItem="{Binding SelectedSubject, | |
Mode=TwoWay}" /> | |
<ComboBox x:Name="ordinaryGradeCmbBx" | |
Grid.Row="1" | |
Grid.Column="0" | |
Grid.ColumnSpan="2" | |
Width="170" | |
HorizontalAlignment="Right" | |
DisplayMemberPath="Key" | |
Header="Grades" | |
ItemsSource="{Binding OrdinaryGradePointKV}" | |
PlaceholderText="Pick a grade" | |
SelectedValue="{Binding SelectedOrdinaryGrade, | |
Mode=TwoWay}" | |
Visibility="{Binding IsHigher, | |
Mode=TwoWay, | |
Converter={StaticResource BoolToNonVisibilityConverter}}" /> | |
<ComboBox x:Name="higherGradeCmbBx" | |
Grid.Row="1" | |
Grid.Column="0" | |
Grid.ColumnSpan="2" | |
Width="170" | |
HorizontalAlignment="Right" | |
DisplayMemberPath="Key" | |
Header="Grades" | |
ItemsSource="{Binding HigherGradePointKV}" | |
PlaceholderText="Pick a grade" | |
SelectedValue="{Binding SelectedHigherGrade, | |
Mode=TwoWay}" | |
Visibility="{Binding IsHigher, | |
Mode=TwoWay, | |
Converter={StaticResource BoolToVisibilityConverter}}" /> | |
<Button x:Name="addGradeBtn" | |
Grid.Row="2" | |
HorizontalAlignment="Left" | |
Command="{Binding Path=AddGradeCommand}" | |
Content="Add Grade" | |
IsEnabled="{Binding ButtonEnabled, | |
Mode=TwoWay}" /> | |
<ToggleButton x:Name="higherTglBtn" | |
Grid.Row="2" | |
Grid.ColumnSpan="2" | |
Margin="0,26.5,114,25.667" | |
HorizontalAlignment="Right" | |
Content="Higher" | |
IsChecked="{Binding IsHigher, | |
Mode=TwoWay}" /> | |
<ToggleButton x:Name="ordinaryTglBtn" | |
Grid.Row="2" | |
Grid.ColumnSpan="2" | |
HorizontalAlignment="Right" | |
Content="Ordinary" | |
IsChecked="{Binding IsOrdinary, | |
Mode=TwoWay}" /> | |
<Border Grid.Row="3" | |
Grid.RowSpan="3" | |
Grid.ColumnSpan="2" | |
Width="400" | |
Margin="0" | |
Background="Black"> | |
<controls:Gauge Grid.Row="3" | |
Grid.RowSpan="3" | |
Grid.ColumnSpan="2" | |
Width="400" | |
Maximum="600" | |
Minimum="0" | |
NeedleBrush="Transparent" | |
ScaleBrush="DarkSlateGray" | |
ScaleTickBrush="Black" | |
TickBrush="Transparent" | |
TrailBrush="DarkSeaGreen" | |
Unit="Leaving Cert Points" | |
UnitBrush="DarkGray" | |
ValueBrush="DarkSeaGreen" | |
ValueStringFormat="N1" | |
Value="{Binding TotalPoints, | |
Mode=TwoWay}" /> | |
</Border> | |
</Grid> | |
<Page.BottomAppBar> | |
<CommandBar x:Name="appBar" IsSticky="True"> | |
<CommandBar.PrimaryCommands> | |
<AppBarButton x:Name="ClearAppBarButton" | |
Command="{Binding Path=ClearGradesCommand}" | |
Icon="Delete" | |
IsCompact="False" | |
Label="Clear All" /> | |
<AppBarButton x:Name="ViewListAppBarButton" | |
Command="{Binding Path=AddGradeCommand}" | |
Icon="ViewAll" | |
IsCompact="False" | |
IsEnabled="{Binding ButtonEnabled, | |
Mode=TwoWay}" | |
Label="View"> | |
<Interactivity:Interaction.Behaviors> | |
<Core:EventTriggerBehavior EventName="Click"> | |
<Core:NavigateToPageAction TargetPage="LC_Points.View.ViewSubjectGradePage" /> | |
</Core:EventTriggerBehavior> | |
</Interactivity:Interaction.Behaviors> | |
</AppBarButton> | |
<AppBarButton x:Name="AboutAppBarButton" | |
Icon="Help" | |
IsCompact="False" | |
Label="About"> | |
<Interactivity:Interaction.Behaviors> | |
<Core:EventTriggerBehavior EventName="Click"> | |
<Core:NavigateToPageAction TargetPage="LC_Points.View.AboutPage" /> | |
</Core:EventTriggerBehavior> | |
</Interactivity:Interaction.Behaviors> | |
</AppBarButton> | |
</CommandBar.PrimaryCommands> | |
<CommandBar.SecondaryCommands> | |
<AppBarButton Label="Share score!"> | |
<Interactivity:Interaction.Behaviors> | |
<Core:EventTriggerBehavior EventName="Click"> | |
<Core:NavigateToPageAction TargetPage="LC_Points.View.LoginPage" /> | |
</Core:EventTriggerBehavior> | |
</Interactivity:Interaction.Behaviors> | |
</AppBarButton> | |
</CommandBar.SecondaryCommands> | |
</CommandBar> | |
</Page.BottomAppBar> | |
</Page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment