-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml
More file actions
275 lines (257 loc) · 14.6 KB
/
App.xaml
File metadata and controls
275 lines (257 loc) · 14.6 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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<Application x:Class="NetIsolatePlus.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!-- ToolTip theme -->
<SolidColorBrush x:Key="ToolTipBg" Color="#151515"/>
<SolidColorBrush x:Key="ToolTipBorder" Color="#2A2A2A"/>
<SolidColorBrush x:Key="ToolTipText" Color="#FFFFFF"/>
<Style TargetType="ToolTip">
<Setter Property="Foreground" Value="{StaticResource ToolTipText}"/>
<Setter Property="Background" Value="{StaticResource ToolTipBg}"/>
<Setter Property="BorderBrush" Value="{StaticResource ToolTipBorder}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="10,6"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Placement" Value="Mouse"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border CornerRadius="8"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Margin="{TemplateBinding Padding}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Palette -->
<Color x:Key="AccentColor">#4CC2FF</Color>
<SolidColorBrush x:Key="AccentBrush" Color="{StaticResource AccentColor}"/>
<SolidColorBrush x:Key="BgBrush" Color="#0D0D0D"/>
<SolidColorBrush x:Key="SurfaceBrush" Color="#111111"/>
<SolidColorBrush x:Key="CardBrush" Color="#1C1C1C"/>
<SolidColorBrush x:Key="StrokeBrush" Color="#2A2A2A"/>
<SolidColorBrush x:Key="TextBrush" Color="#F5F5F5"/>
<SolidColorBrush x:Key="SubTextBrush" Color="#A9A9A9"/>
<!-- Typography -->
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal"/>
</Style>
<!-- Card -->
<Style x:Key="CardBorder" TargetType="Border">
<Setter Property="CornerRadius" Value="12"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="Margin" Value="0,0,0,8"/>
<Setter Property="Background" Value="{StaticResource CardBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource StrokeBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#000000" Opacity="0.25" BlurRadius="8" ShadowDepth="1"/>
</Setter.Value>
</Setter>
</Style>
<!-- Luxury pill button -->
<Style x:Key="PillButtonStyle" TargetType="Button">
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="16,9"/>
<Setter Property="MinWidth" Value="72"/>
<Setter Property="MinHeight" Value="25" />
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="Background" Value="#0F0F10"/>
<Setter Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<Border CornerRadius="12"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"/>
<Border CornerRadius="11"
BorderBrush="#40FFFFFF"
BorderThickness="1"
Margin="1"/>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#171A1C"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#1F2428"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="#888"/>
<Setter Property="BorderBrush" Value="#3A3A3A"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Toggle switch (with ON/OFF text) -->
<Style x:Key="ToggleSwitchStyle" TargetType="CheckBox">
<Setter Property="Width" Value="48"/>
<Setter Property="Height" Value="26"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid>
<Border x:Name="Track" CornerRadius="13" Background="#2B2B2B" BorderBrush="#3A3A3A" BorderThickness="1"/>
<!-- ON/OFF label layer (subtle, modern) -->
<Grid Margin="6,0,6,0" IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="OffText"
Grid.Column="0"
Text="OFF"
FontSize="10"
FontWeight="SemiBold"
Foreground="#B0B0B0"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Opacity="0.85"/>
<TextBlock x:Name="OnText"
Grid.Column="1"
Text="ON"
FontSize="10"
FontWeight="SemiBold"
Foreground="#BFEFFF"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Opacity="0.25"/>
</Grid>
<Ellipse x:Name="Thumb" Width="20" Height="20" Margin="4,3,0,3"
HorizontalAlignment="Left" Fill="White"/>
<ContentPresenter Visibility="Collapsed"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Track" Property="Background" Value="#113344"/>
<Setter TargetName="Track" Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
<Setter TargetName="Thumb" Property="HorizontalAlignment" Value="Right"/>
<Setter TargetName="Thumb" Property="Margin" Value="0,3,4,3"/>
<Setter TargetName="Thumb" Property="Fill" Value="{StaticResource AccentBrush}"/>
<Setter TargetName="OffText" Property="Opacity" Value="0.25"/>
<Setter TargetName="OnText" Property="Opacity" Value="0.9"/>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="OffText" Property="Opacity" Value="0.85"/>
<Setter TargetName="OnText" Property="Opacity" Value="0.25"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Track" Property="Opacity" Value="0.5"/>
<Setter TargetName="Thumb" Property="Opacity" Value="0.6"/>
<Setter TargetName="OffText" Property="Opacity" Value="0.35"/>
<Setter TargetName="OnText" Property="Opacity" Value="0.35"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Dark ComboBox (closed + popup) -->
<Style x:Key="DarkComboBox" TargetType="ComboBox">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="#141414"/>
<Setter Property="BorderBrush" Value="#2A2A2A"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid SnapsToDevicePixels="True">
<ToggleButton x:Name="Toggle"
Focusable="False"
OverridesDefaultStyle="True"
Background="Transparent"
BorderBrush="{x:Null}"
FocusVisualStyle="{x:Null}"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<ContentPresenter/>
</ControlTemplate>
</ToggleButton.Template>
<Border x:Name="Face"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="8">
<Grid>
<ContentPresenter Margin="10,6,30,6"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
HorizontalAlignment="Left"
VerticalAlignment="Center"/>
<Path Data="M 0 0 L 4 5 L 8 0 Z" Fill="White"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,9,0"/>
</Grid>
</Border>
</ToggleButton>
<Popup x:Name="PART_Popup"
Placement="Bottom"
PlacementTarget="{Binding ElementName=Toggle}"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True" Focusable="False"
PopupAnimation="Slide">
<Border Background="#141414"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1" CornerRadius="8"
Width="{Binding ElementName=Toggle, Path=ActualWidth}">
<ScrollViewer CanContentScroll="True"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<ItemsPresenter HorizontalAlignment="Stretch"/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="ComboBoxItem">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="#141414"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border x:Name="Bd" Background="{TemplateBinding Background}">
<ContentPresenter Margin="{TemplateBinding Padding}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#1E1E1E"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#232323"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>