-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnswerSheet.xaml
68 lines (67 loc) · 4.42 KB
/
AnswerSheet.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<Window x:Name="AnswerSheetWindow" x:Class="CombineCodePractice.AnswerSheet"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:CombineCodePractice"
mc:Ignorable="d"
Closed="AnswerSheetWindow_Closed"
Title="Answer Sheet" Height="450" Width="800" ResizeMode="NoResize" Background="#FF565656" WindowStartupLocation="CenterScreen">
<Grid>
<ListView x:Name="AnswerLV" ItemsSource="{Binding Path=AnswerList}" Margin="0,0,0,217" Foreground="White" d:ItemsSource="{d:SampleData ItemCount=5}" BorderBrush="#FF545961" Background="Black">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF2B2E5D" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#FF444884" />
</Trigger>
</Style.Triggers>
</Style>
</ListView.ItemContainerStyle>
<ListView.View>
<GridView>
<GridViewColumn Header="Question" DisplayMemberBinding="{Binding Path=Question}">
<GridViewColumn.HeaderContainerStyle>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="Background" Value="#FFC5C5C5"/>
</Style>
</GridViewColumn.HeaderContainerStyle>
</GridViewColumn>
<GridViewColumn Header="Answer" DisplayMemberBinding="{Binding Path=AnsweredText}">
<GridViewColumn.HeaderContainerStyle>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="Background" Value="#FFC5C5C5"/>
</Style>
</GridViewColumn.HeaderContainerStyle>
</GridViewColumn>
<GridViewColumn Header="Correct">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Correct}" Foreground="{Binding Path=AnswerColor}">
</TextBlock>
</DataTemplate>
</GridViewColumn.CellTemplate>
<GridViewColumn.HeaderContainerStyle>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="Background" Value="#FFC5C5C5"/>
</Style>
</GridViewColumn.HeaderContainerStyle>
</GridViewColumn>
<GridViewColumn Header="Correction" DisplayMemberBinding="{Binding Path=Correction}">
<GridViewColumn.HeaderContainerStyle>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="Background" Value="#FFC5C5C5"/>
</Style>
</GridViewColumn.HeaderContainerStyle>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<Label x:Name="ScoreLbl" VerticalContentAlignment="Top" HorizontalContentAlignment="Center" Content="[SCORE]" HorizontalAlignment="Left" Margin="0,222,0,0" VerticalAlignment="Top" Width="790" FontSize="72" Height="106" Foreground="White"/>
<Button x:Name="TryAgainBtn" Content="Try again" HorizontalAlignment="Left" Margin="10,0,0,10" VerticalAlignment="Bottom" Height="61" Width="314" FontSize="36" Background="#FF797979" Foreground="White" Click="TryAgainBtn_Click"/>
<Button x:Name="DifferentQuestionsButton" Content="Different questions" Margin="0,0,10,10" VerticalAlignment="Bottom" Height="61" FontSize="36" Background="#FF797979" Foreground="White" HorizontalAlignment="Right" Width="314" Click="DifferentQuestionsButton_Click"/>
</Grid>
</Window>