forked from Half1900/AlphaClicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WindowSettings.xaml
118 lines (98 loc) · 4.48 KB
/
WindowSettings.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
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
<Window x:Name="windowSettings" x:Class="AlphaClicker.WindowSettings"
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:AlphaClicker"
mc:Ignorable="d"
ResizeMode="CanMinimize"
WindowStyle="None"
Title="Alpha Clicker Settings"
Height="133" Width="300"
Background="{x:Null}"
AllowsTransparency="True"
MouseLeftButtonDown="windowSettings_MouseLeftButtonDown"
Closing="windowSettings_Closing" Loaded="windowSettings_Loaded">
<Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="00:00:00.5" Storyboard.TargetProperty="Opacity" From="0" To="1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
<Border Margin="10"
CornerRadius="15"
Background="{DynamicResource WindowBackgroundColor}"
BorderBrush="Gray"
BorderThickness="0.3">
<Border.Effect>
<DropShadowEffect BlurRadius="15" Direction="-90"
RenderingBias="Quality" ShadowDepth="2"/>
</Border.Effect>
<Grid HorizontalAlignment="Stretch" Height="Auto" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Label x:Name="windowTitle" Content="设置"
FontSize="15"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="0,0,0,0"/>
<!-- X button -->
<Ellipse x:Name="closeButton"
Fill="#e00bc4"
Cursor="Hand"
Style="{DynamicResource GrowOnHover}"
Grid.Row="0"
Height="20" Width="20"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Margin="0,0,10,0"
MouseLeftButtonDown="closeButton_MouseLeftButtonDown">
<Ellipse.RenderTransform>
<ScaleTransform ScaleX="1.0" ScaleY="1.0" />
</Ellipse.RenderTransform>
</Ellipse>
<Grid Grid.Row="1" HorizontalAlignment="Stretch" Height="Auto" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="27"></RowDefinition>
<RowDefinition Height="27"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<CheckBox x:Name="darkThemeSwitch"
HorizontalAlignment="Right"
Cursor="Hand"
Height="25"
VerticalAlignment="Center"
Margin="0,0,30,0" Checked="darkThemeSwitch_Checked" Unchecked="darkThemeSwitch_Unchecked"/>
<Label Content="深色主题"
FontSize="14"
VerticalAlignment="Center"
HorizontalAlignment="Left"
VerticalContentAlignment="Center"
Height="26"
Width="94"
Margin="30,0,0,1"/>
<CheckBox x:Name="topMostSwitch"
HorizontalAlignment="Right"
Cursor="Hand"
Height="25"
Grid.Row="1"
VerticalAlignment="Center"
Margin="0,0,30,0" Checked="topMostSwitch_Checked" Unchecked="topMostSwitch_Unchecked"/>
<Label Content="窗口置顶"
FontSize="14"
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Left"
VerticalContentAlignment="Center"
Height="27"
Width="94"
Margin="30,0,0,0"/>
</Grid>
</Grid>
</Border>
</Window>