-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.xaml
173 lines (173 loc) · 10.7 KB
/
App.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<Application x:Class="Leo.App"
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" mc:Ignorable="d"
StartupUri="/Windows/MainWindow.xaml"
ShutdownMode="OnMainWindowClose">
<Application.Resources>
<Style x:Key="ToggleSwitchStyle" TargetType="CheckBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid x:Name="Body">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border x:Name="SwitchBorder" Grid.Column="0" Width="35" Height="15" BorderBrush="Transparent" BorderThickness="0"
CornerRadius="7" Background="White">
<Rectangle x:Name="Switch" Width="10" Height="10" Fill="Black" Stroke="Black" StrokeThickness="1" RadiusX="7"
RadiusY="7" VerticalAlignment="Center" HorizontalAlignment="Left">
<Rectangle.RenderTransform>
<TranslateTransform x:Name="SwitchTranslateTransform" X="5"/>
</Rectangle.RenderTransform>
</Rectangle>
</Border>
<ContentPresenter Grid.Column="1" x:Name="Content" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0,0,0"/>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CheckStates">
<VisualState x:Name="Checked">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="SwitchTranslateTransform" Storyboard.TargetProperty="X" To="20" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="SwitchTranslateTransform" Storyboard.TargetProperty="X" To="5" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Body" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="LeoButtonStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="Body">
<Rectangle x:Name="Stroke" RadiusX="5" RadiusY="5" Fill="White" Stroke="White" />
<ContentPresenter x:Name="Content" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Rectangle x:Name="Fill" RadiusX="5" RadiusY="5" Fill="Transparent" Stroke="White" Cursor="Hand"/>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Stroke" Storyboard.TargetProperty="Opacity" To="0.7" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Normal">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Stroke" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Body" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FrameButtonsStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="Body">
<Rectangle x:Name="ButtonBg" Height="30" VerticalAlignment="Center" Width="30" HorizontalAlignment="Center"
Opacity="0" RadiusX="6" RadiusY="6" Fill="White"/>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Height="25" Width="25"/>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="ButtonBg" Storyboard.TargetProperty="Opacity" To="0.2" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Normal">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="ButtonBg" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Body" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CloseButtonsStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="Body">
<Rectangle x:Name="ButtonBg" Height="30" VerticalAlignment="Center" Width="30" HorizontalAlignment="Center"
Opacity="0" RadiusX="6" RadiusY="6" Fill="#FFA70000"/>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Height="25" Width="25"/>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="ButtonBg" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Normal">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="ButtonBg" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollBarThumbStyle" TargetType="{x:Type Thumb}">
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="Margin" Value="1,0,1,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Rectangle RadiusX="6" RadiusY="6" Fill="White" Margin="2"></Rectangle>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
<Grid>
<Track Name="PART_Track"
IsDirectionReversed="True">
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBarThumbStyle}">
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
<Style TargetType="{x:Type ScrollBar}">
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}"/>
</Style>
<Label x:Key="Version" Content="1.0.0"/>
</Application.Resources>
</Application>