-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml
More file actions
547 lines (515 loc) · 32.3 KB
/
App.xaml
File metadata and controls
547 lines (515 loc) · 32.3 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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
<Application x:Class="sqlSense.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:sqlSense"
xmlns:models="clr-namespace:sqlSense.Models"
xmlns:converters="clr-namespace:sqlSense.Converters"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="UI/Icons.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!-- Colors -->
<Color x:Key="BackgroundColor">#1E1E1E</Color>
<Color x:Key="PanelColor">#252526</Color>
<Color x:Key="PanelLightColor">#2D2D30</Color>
<Color x:Key="BorderColor">#3C3C3C</Color>
<Color x:Key="PrimaryAccentColor">#4FC3F7</Color>
<Color x:Key="SecondaryAccentColor">#C586C0</Color>
<Color x:Key="SuccessColor">#4CAF50</Color>
<Color x:Key="WarningColor">#FFB74D</Color>
<Color x:Key="ErrorColor">#F44336</Color>
<Color x:Key="TextPrimaryColor">#FFFFFF</Color>
<Color x:Key="TextSecondaryColor">#CCCCCC</Color>
<Color x:Key="MutedColor">#888888</Color>
<!-- Brushes -->
<SolidColorBrush x:Key="BackgroundBrush" Color="{StaticResource BackgroundColor}"/>
<SolidColorBrush x:Key="PanelBrush" Color="{StaticResource PanelColor}"/>
<SolidColorBrush x:Key="PanelLightBrush" Color="{StaticResource PanelLightColor}"/>
<SolidColorBrush x:Key="BorderBrush" Color="{StaticResource BorderColor}"/>
<SolidColorBrush x:Key="PrimaryAccentBrush" Color="{StaticResource PrimaryAccentColor}"/>
<SolidColorBrush x:Key="SecondaryAccentBrush" Color="{StaticResource SecondaryAccentColor}"/>
<SolidColorBrush x:Key="TextPrimaryBrush" Color="{StaticResource TextPrimaryColor}"/>
<SolidColorBrush x:Key="TextSecondaryBrush" Color="{StaticResource TextSecondaryColor}"/>
<SolidColorBrush x:Key="MutedBrush" Color="{StaticResource MutedColor}"/>
<SolidColorBrush x:Key="SuccessBrush" Color="{StaticResource SuccessColor}"/>
<SolidColorBrush x:Key="WarningBrush" Color="{StaticResource WarningColor}"/>
<SolidColorBrush x:Key="ErrorBrush" Color="{StaticResource ErrorColor}"/>
<!-- Converters -->
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
<converters:InverseBoolToVisibilityConverter x:Key="InverseBoolToVis"/>
<converters:StringToBrushConverter x:Key="StringToBrush"/>
<!-- Common Effects -->
<DropShadowEffect x:Key="NodeShadow" BlurRadius="15" ShadowDepth="0" Opacity="0.4" Color="Black"/>
<!-- Global Styles -->
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
</Style>
<Style TargetType="Window">
<Setter Property="Background" Value="{StaticResource BackgroundBrush}"/>
</Style>
<!-- ContextMenu Style -->
<Style TargetType="{x:Type ContextMenu}">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="1">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Separator Style -->
<Style TargetType="{x:Type Separator}">
<Setter Property="Background" Value="{StaticResource BorderBrush}"/>
<Setter Property="Height" Value="1"/>
<Setter Property="Margin" Value="6,4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Separator}">
<Border Background="{TemplateBinding Background}"
Height="{TemplateBinding Height}"
Margin="{TemplateBinding Margin}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- MenuItem Style -->
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="8,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border x:Name="templateRoot"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="True">
<Grid Margin="0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="IconColumn" Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGT"/>
<ColumnDefinition x:Name="ArrowColumn" Width="20"/>
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="Icon" ContentSource="Icon" HorizontalAlignment="Center" Height="16" Margin="3" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" Width="16"/>
<ContentPresenter x:Name="HeaderHost" Grid.Column="1"
ContentSource="Header"
Margin="{TemplateBinding Padding}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<TextBlock x:Name="InputGestureText" Grid.Column="2"
Text="{TemplateBinding InputGestureText}"
Foreground="{StaticResource MutedBrush}"
VerticalAlignment="Center" Margin="10,0,0,0"/>
<Path x:Name="RightArrow" Grid.Column="3" Data="M 0 0 L 4 4 L 0 8 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"/>
<Popup x:Name="PART_Popup" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Right">
<Border x:Name="SubMenuBorder" Background="{StaticResource PanelBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1" Padding="2">
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</Popup>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource PanelLightBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}"/>
</Trigger>
<Trigger Property="Role" Value="TopLevelHeader">
<Setter Property="Padding" Value="12,5"/>
<Setter TargetName="HeaderHost" Property="HorizontalAlignment" Value="Center"/>
<Setter TargetName="IconColumn" Property="Width" Value="0"/>
<Setter TargetName="ArrowColumn" Property="Width" Value="0"/>
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
<Setter TargetName="PART_Popup" Property="Placement" Value="Bottom"/>
<Setter TargetName="RightArrow" Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="Role" Value="SubmenuHeader">
<Setter TargetName="RightArrow" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource MutedBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type Menu}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}"/>
</Style>
<!-- TreeView Item Toggle Button (expand/collapse arrow) -->
<Style x:Key="ExpandCollapseToggle" TargetType="ToggleButton">
<Setter Property="Focusable" Value="False"/>
<Setter Property="Width" Value="16"/>
<Setter Property="Height" Value="16"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent" Padding="2">
<Path x:Name="Arrow" Fill="#888888"
HorizontalAlignment="Center" VerticalAlignment="Center"
Data="M 0 0 L 5 4 L 0 8 Z"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Arrow" Property="Data" Value="M 0 0 L 8 0 L 4 5 Z"/>
<Setter TargetName="Arrow" Property="Fill" Value="#CCCCCC"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Arrow" Property="Fill" Value="#4FC3F7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- TreeViewItem Container Style -->
<Style TargetType="TreeViewItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#CCCCCC"/>
<Setter Property="Padding" Value="2,1"/>
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
<Setter Property="ToolTip" Value="{Binding Tooltip}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TreeViewItem">
<StackPanel>
<Border x:Name="ItemBorder" Background="{TemplateBinding Background}"
BorderThickness="0" Padding="0,1">
<Grid Margin="{Binding Converter={x:Static local:TreeIndentConverter.Instance}, RelativeSource={RelativeSource TemplatedParent}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="18"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ToggleButton x:Name="Expander" Grid.Column="0"
Style="{StaticResource ExpandCollapseToggle}"
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
ClickMode="Press"/>
<ContentPresenter x:Name="PART_Header" Grid.Column="1"
ContentSource="Header" Margin="2,0,0,0"
VerticalAlignment="Center"/>
</Grid>
</Border>
<ItemsPresenter x:Name="ItemsHost"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="HasItems" Value="False">
<Setter TargetName="Expander" Property="Visibility" Value="Hidden"/>
</Trigger>
<Trigger Property="IsExpanded" Value="False">
<Setter TargetName="ItemsHost" Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="ItemBorder" Property="Background" Value="#094771"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
<Condition Property="IsSelected" Value="False"/>
</MultiTrigger.Conditions>
<Setter TargetName="ItemBorder" Property="Background" Value="#2A2D2E"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- HierarchicalDataTemplate for tree items with icons -->
<HierarchicalDataTemplate DataType="{x:Type models:DatabaseTreeItem}"
ItemsSource="{Binding Children}">
<Grid Margin="1,1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="22"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding IconGlyph}"
FontFamily="Segoe MDL2 Assets" FontSize="14"
Foreground="{Binding IconColor, Converter={StaticResource StringToBrush}}"
VerticalAlignment="Center" HorizontalAlignment="Center"
Opacity="0.9"/>
<TextBlock Grid.Column="1" Text="{Binding Name}"
VerticalAlignment="Center" FontSize="12.5"
Margin="4,0,0,0"/>
<TextBlock Grid.Column="2" Text=" (loading...)"
FontSize="10" Foreground="#888888"
VerticalAlignment="Center" Margin="6,0,0,0"
Visibility="{Binding IsLoading, Converter={StaticResource BoolToVis}}"/>
</Grid>
</HierarchicalDataTemplate>
<!-- Dot Pattern Background Brush -->
<DrawingBrush x:Key="DotPatternBrush" TileMode="Tile"
Viewport="0,0,20,20" ViewportUnits="Absolute"
Viewbox="0,0,20,20" ViewboxUnits="Absolute">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="#1E1E1E">
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,20,20"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="#333333">
<GeometryDrawing.Geometry>
<EllipseGeometry Center="10,10" RadiusX="1" RadiusY="1"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
<!-- Zoom Button Style -->
<Style x:Key="ZoomButton" TargetType="Button">
<Setter Property="Width" Value="32"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Background" Value="#2D2D30"/>
<Setter Property="Foreground" Value="#CCCCCC"/>
<Setter Property="BorderBrush" Value="#3C3C3C"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bg" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bg" Property="Background" Value="#3E3E42"/>
<Setter TargetName="bg" Property="BorderBrush" Value="#4FC3F7"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="bg" Property="Background" Value="#094771"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Pagination Button Style -->
<Style x:Key="PaginationButton" TargetType="Button">
<Setter Property="Width" Value="26"/>
<Setter Property="Height" Value="22"/>
<Setter Property="Background" Value="#2D2D30"/>
<Setter Property="Foreground" Value="#CCCCCC"/>
<Setter Property="BorderBrush" Value="#3C3C3C"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bg" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="3">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bg" Property="Background" Value="#3E3E42"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="bg" Property="Opacity" Value="0.4"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- DataGrid Styles -->
<Style x:Key="DarkDataGrid" TargetType="DataGrid">
<Setter Property="Background" Value="#1E1E1E"/>
<Setter Property="Foreground" Value="#CCCCCC"/>
<Setter Property="BorderBrush" Value="#3C3C3C"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="RowBackground" Value="#252526"/>
<Setter Property="AlternatingRowBackground" Value="#2D2D30"/>
<Setter Property="GridLinesVisibility" Value="None"/>
<Setter Property="HeadersVisibility" Value="Column"/>
<Setter Property="AutoGenerateColumns" Value="True"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="CanUserAddRows" Value="False"/>
<Setter Property="CanUserDeleteRows" Value="False"/>
<Setter Property="SelectionMode" Value="Single"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="FontFamily" Value="Consolas"/>
<Setter Property="RowHeight" Value="24"/>
<Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ColumnWidth" Value="150"/>
</Style>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#333333"/>
<Setter Property="Foreground" Value="#4FC3F7"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="BorderBrush" Value="#3C3C3C"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
</Style>
<Style TargetType="DataGridCell">
<Setter Property="BorderBrush" Value="#3C3C3C"/>
<Setter Property="BorderThickness" Value="0,0,1,0"/>
<Setter Property="Padding" Value="6,2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<ContentPresenter VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#094771"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="DataGridRow">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#2A2D2E"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#094771"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ComboBox Styles (VS Code style) -->
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="ClickMode" Value="Press"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="templateRoot" Background="#252526" BorderBrush="#3C3C3C" BorderThickness="1" SnapsToDevicePixels="true" CornerRadius="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<Path x:Name="arrow" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Fill="#888888" Data="M0,0 L4,4 L8,0 Z"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="templateRoot" Property="Background" Value="#3E3E42"/>
<Setter TargetName="arrow" Property="Fill" Value="#CCCCCC"/>
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="arrow" Property="Data" Value="M0,4 L4,0 L8,4 Z"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" Background="#252526" BorderBrush="#3C3C3C" BorderThickness="1">
<ScrollViewer x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
</Canvas>
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</ScrollViewer>
</Border>
</Popup>
<ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasItems" Value="false">
<Setter TargetName="dropDownBorder" Property="Height" Value="95"/>
</Trigger>
<Trigger Property="IsGrouping" Value="true">
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</Trigger>
<Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
<Setter TargetName="opaqueRect" Property="Margin" Value="0,0,5,5"/>
<Setter TargetName="opaqueRect" Property="SnapsToDevicePixels" Value="true"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Background" Value="#252526"/>
<Setter Property="BorderBrush" Value="#3C3C3C"/>
<Setter Property="Foreground" Value="#CCCCCC"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Padding" Value="8,3,5,3"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
<Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="#4FC3F7"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="#4FC3F7"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Padding" Value="8,4,8,4"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border x:Name="bd" Background="Transparent" SnapsToDevicePixels="True">
<ContentPresenter x:Name="content" Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#2A2D2E"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="bd" Property="Background" Value="#094771"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>