-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettings.xaml
More file actions
141 lines (136 loc) · 8.64 KB
/
Settings.xaml
File metadata and controls
141 lines (136 loc) · 8.64 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<Window x:Class="MathGame.Settings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Title="Settings" MinHeight="230" MinWidth="500" WindowStartupLocation="CenterScreen" Topmost="True"
WindowStyle="None" ResizeMode="NoResize">
<Window.Resources>
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="5" Background="Black" BorderBrush="White"
BorderThickness="1" />
<Path x:Name="Arrow" Grid.Column="1" Fill="White" HorizontalAlignment="Center"
VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Background" Value="Black" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="Border" Property="Background" Value="Black" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Border" Property="Background" Value="Black" />
<Setter TargetName="Arrow" Property="Fill" Value="Black" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
<Border x:Name="PART_ContentHost" Focusable="False" Background="Black" />
</ControlTemplate>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Background" Value="Black" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderBrush" Value="White" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Grid>
<ToggleButton Name="ToggleButton" Template="{StaticResource ComboBoxToggleButton}"
Grid.Column="2" Focusable="false" ClickMode="Press"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
<ContentPresenter Name="ContentSite" IsHitTestVisible="False"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Margin="13,3,44,3" VerticalAlignment="Center" HorizontalAlignment="Left" />
<TextBox x:Name="PART_EditableTextBox" Style="{x:Null}"
Template="{StaticResource ComboBoxTextBox}" HorizontalAlignment="Left"
VerticalAlignment="Center" Margin="13,3,44,3" Focusable="True" Background="Black"
Foreground="White" Visibility="Hidden" IsReadOnly="{TemplateBinding IsReadOnly}" />
<Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
<Grid Name="DropDown" SnapsToDevicePixels="True"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder" Background="Black" BorderThickness="1"
BorderBrush="White" CornerRadius="10" />
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True"
KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasItems" Value="false">
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="White" />
</Trigger>
<Trigger Property="IsGrouping" Value="true">
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
</Trigger>
<Trigger SourceName="Popup" Property="AllowsTransparency" Value="true">
<Setter TargetName="DropDownBorder" Property="CornerRadius" Value="4" />
<Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Background" Value="Black" />
<Setter Property="Foreground" Value="White" />
</Style>
</Window.Resources>
<Grid Background="Black">
<StackPanel Margin="10,10,10,10">
<Label FontSize="20" FontWeight="Bold" Foreground="White">SETTINGS</Label>
<Grid Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="70"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Foreground="White" FontSize="15">Maximum number of steps to reach target number</Label>
<ComboBox Grid.Row="0" Grid.Column="1" Name="DifficultyComboBox" SelectedIndex="0" FontSize="15">
<ComboBoxItem Content="2"></ComboBoxItem>
<ComboBoxItem Content="3"></ComboBoxItem>
<ComboBoxItem Content="4"></ComboBoxItem>
</ComboBox>
<Label Grid.Row="1" Grid.Column="0" Foreground="White" FontSize="15">Enable Hard Mode</Label>
<CheckBox Grid.Row="1" Grid.Column="1" Name="HardModeCheckBox" HorizontalAlignment="Center"
VerticalAlignment="Center">
<CheckBox.LayoutTransform>
<ScaleTransform ScaleX="1.7" ScaleY="1.7"></ScaleTransform>
</CheckBox.LayoutTransform>
</CheckBox>
</Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,70,0,0">
<Border CornerRadius="5" Background="White" BorderThickness="1" BorderBrush="White">
<Button Content="SAVE" Padding="5,1,5,1" FontSize="20" FontWeight="SemiBold"
Background="DodgerBlue" Foreground="White" BorderBrush="Transparent" Click="Save"
MouseEnter="ButtonMouseEnter" MouseLeave="SaveButtonMouseLeave" />
</Border>
<Border CornerRadius="5" Background="White" BorderThickness="1" BorderBrush="White" Margin="10,0,0,0">
<Button Content="CANCEL" Padding="5,1,5,1" FontSize="20" FontWeight="SemiBold" Background="Black"
Foreground="White" BorderBrush="Transparent" Click="Cancel" MouseEnter="ButtonMouseEnter"
MouseLeave="CancelButtonMouseLeave" />
</Border>
</StackPanel>
</StackPanel>
</Grid>
</Window>