-
Notifications
You must be signed in to change notification settings - Fork 4
/
App.xaml
734 lines (684 loc) · 40.8 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
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
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
<Application
x:Class="Dofus.Retro.Supertools.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Dofus.Retro.Supertools.Controls"
StartupUri="/Windows/MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<FontFamily x:Key="BebasNeue">pack://application:,,,/Fonts/#Bebas Neue</FontFamily>
<FontFamily x:Key="Whitney">pack://application:,,,/Fonts/#Whitney</FontFamily>
<SolidColorBrush x:Key="BrushFocusAccent" Color="#142448" />
<SolidColorBrush x:Key="BrushFocus" Color="#33446b" />
<SolidColorBrush x:Key="BrushBlackDark" Color="#202225" />
<SolidColorBrush x:Key="BrushBlack" Color="#23272A" />
<SolidColorBrush x:Key="BrushBlackLight" Color="#36393F" />
<Color
x:Key="ColorBlackDark"
B="82"
G="82"
R="82" />
<Color
x:Key="ColorGreen"
B="83"
G="150"
R="102" />
<SolidColorBrush x:Key="BrushForeground" Color="#bebcbe" />
<SolidColorBrush x:Key="BrushBorderDark" Color="#202020" />
<SolidColorBrush x:Key="BrushBorderLight" Color="#202020" />
<SolidColorBrush x:Key="BrushGreen" Color="#43B581" />
<SolidColorBrush x:Key="BrushBlue" Color="#6786c7" />
<SolidColorBrush x:Key="BrushFuschia" Color="#dd1265" />
<SolidColorBrush x:Key="BrushRed" Color="#f04747" />
<SolidColorBrush x:Key="BrushYellow" Color="#FBB848" />
<Style TargetType="{x:Type TabControl}">
<Setter Property="Background" Value="{StaticResource BrushBlackDark}" />
<Setter Property="BorderBrush" Value="{StaticResource BrushBorderLight}" />
</Style>
<Style TargetType="TabItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border
x:Name="Border"
Margin="0,5,3,10"
Padding="10,6,10,6"
CornerRadius="3">
<TextBlock
x:Name="Txt"
FontWeight="DemiBold"
Foreground="{StaticResource BrushForeground}"
Text="{TemplateBinding Header}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Border" Property="Background" Value="{StaticResource BrushBlackLight}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="{StaticResource BrushBlackLight}" />
<Setter TargetName="Txt" Property="TextDecorations" Value="Underline" />
<Setter TargetName="Border" Property="Cursor" Value="Hand" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DarkWindow" TargetType="{x:Type Window}">
<Setter Property="ResizeMode" Value="NoResize" />
<Setter Property="Background" Value="{StaticResource BrushBlack}" />
<Setter Property="BorderBrush" Value="{StaticResource BrushBorderLight}" />
<Setter Property="WindowStyle" Value="None" />
<Setter Property="AllowsTransparency" Value="True" />
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
<Setter Property="FontFamily" Value="{StaticResource Whitney}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<Grid>
<Border
Margin="5"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1">
<Border.Effect>
<DropShadowEffect
BlurRadius="8"
Direction="132"
ShadowDepth="0"
Color="{StaticResource ColorBlackDark}" />
</Border.Effect>
</Border>
<StackPanel Margin="6">
<Grid
x:Name="GrdDragForm"
MaxHeight="32"
Background="Transparent"
Cursor="SizeAll"
MouseDown="GrdDragForm_MouseDown">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image
Grid.Column="0"
Margin="5,0,5,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Source="{TemplateBinding Icon}" />
<TextBlock
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Foreground="{StaticResource BrushForeground}"
Text="{TemplateBinding Title}" />
<StackPanel
Grid.Column="2"
HorizontalAlignment="Right"
Orientation="Horizontal">
<controls:WindowControlButton
x:Name="BtnMinimize"
HorizontalAlignment="Right"
Click="BtnMinimize_OnClick"
Cursor="Arrow"
FocusBrush="{StaticResource BrushBlackLight}"
FontFamily="Segoe MDL2 Assets"
FontSize="10"
Foreground="{StaticResource BrushForeground}"
Text=""
ToolTip="Minimiser" />
<controls:WindowControlButton
x:Name="BtnClose"
HorizontalAlignment="Right"
Click="BtnClose_Click"
Cursor="Arrow"
FocusBrush="Red"
FontFamily="Segoe MDL2 Assets"
FontSize="10"
Foreground="{StaticResource BrushForeground}"
Text=""
ToolTip="Fermer" />
</StackPanel>
</Grid>
<AdornerDecorator>
<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</AdornerDecorator>
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="RoundedItem" TargetType="ListBoxItem">
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border
Name="ItemBorder"
Height="32"
Margin="2"
Background="{StaticResource BrushBlack}"
CornerRadius="3">
<ContentPresenter Margin="8,3,8,3" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="ItemBorder" Property="Background" Value="{StaticResource BrushBlackLight}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsSelected" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="ItemBorder" Property="Background" Value="{StaticResource BrushBlackLight}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="{StaticResource BrushBlackDark}" />
<Setter Property="ItemContainerStyle" Value="{StaticResource RoundedItem}" />
</Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<StackPanel Orientation="Horizontal">
<Viewbox Cursor="Hand">
<Border
x:Name="Border"
Width="40"
Height="20"
Background="{DynamicResource BrushBlackLight}"
BorderBrush="{StaticResource BrushBorderLight}"
CornerRadius="10"
UseLayoutRounding="True">
<Ellipse
x:Name="Ellipse"
Margin="2,1,2,1"
HorizontalAlignment="Stretch"
Fill="#FFFFFFFF"
Stretch="Uniform"
Stroke="LightGray"
StrokeThickness="0.2">
<Ellipse.Effect>
<DropShadowEffect
BlurRadius="10"
Direction="260"
Opacity="0.3"
ShadowDepth="1" />
</Ellipse.Effect>
</Ellipse>
</Border>
</Viewbox>
<ContentPresenter
Margin="10,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</StackPanel>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="Checked">
<BeginStoryboard>
<Storyboard>
<ColorAnimation
Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
To="#43B581"
Duration="0:0:0.1" />
<ThicknessAnimation
Storyboard.TargetName="Ellipse"
Storyboard.TargetProperty="Margin"
To="20 1 2 1"
Duration="0:0:0.1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="Unchecked">
<BeginStoryboard>
<Storyboard>
<ColorAnimation
Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
To="#36393F"
Duration="0:0:0.1" />
<ThicknessAnimation
Storyboard.TargetName="Ellipse"
Storyboard.TargetProperty="Margin"
To="2 1 2 1"
Duration="0:0:0.1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ToolTip">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="HasDropShadow" Value="True" />
<Setter Property="FontFamily" Value="{StaticResource Whitney}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
<Setter Property="MaxWidth" Value="350" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border
Name="Border"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Background="{StaticResource BrushBlack}"
BorderBrush="{StaticResource BrushBorderLight}"
BorderThickness="1"
CornerRadius="3"
SnapsToDevicePixels="True"
UseLayoutRounding="True">
<ContentPresenter
Margin="8,6,8,6"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
<!--<ControlTemplate.Triggers>
<Trigger Property="HasDropShadow" Value="true">
<Setter TargetName="Border" Property="CornerRadius" Value="0" />
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true" />
</Trigger>
</ControlTemplate.Triggers>-->
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Resources>
<Style TargetType="ContentPresenter">
<Style.Resources>
<Style TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
</Style.Resources>
</Style>
</Style.Resources>
</Style>
<Style TargetType="CheckBox">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<StackPanel
Height="34"
Background="Transparent"
Orientation="Horizontal">
<Border
x:Name="FocusBorder"
Width="20"
Height="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderBrush="Transparent"
BorderThickness="2"
CornerRadius="2">
<Border
x:Name="MainBorder"
Width="16"
Height="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="{StaticResource BrushBlackLight}"
BorderBrush="{StaticResource BrushBorderDark}"
BorderThickness="1"
CornerRadius="1"
Cursor="Hand">
<Border CornerRadius="{Binding ElementName=MainBorder, Path=CornerRadius}">
<Path
x:Name="CheckMark"
Margin="2"
ClipToBounds="True"
Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z"
Fill="{StaticResource BrushForeground}"
Opacity="0"
SnapsToDevicePixels="True"
Stretch="Fill" />
</Border>
</Border>
</Border>
<ContentPresenter
Margin="6,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Cursor="Hand" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="FocusBorder" Property="BorderBrush" Value="{StaticResource BrushFocus}" />
<Setter TargetName="MainBorder" Property="BorderBrush" Value="{StaticResource BrushFocusAccent}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="CheckMark" Property="Opacity" Value="1" />
<!--<Setter TargetName="MainBorder" Property="Background" Value="{StaticResource BrushBackgroundLight}" />
<Setter TargetName="FocusBorder" Property="BorderBrush" Value="{StaticResource BrushFocus}" />
<Setter TargetName="MainBorder" Property="BorderBrush" Value="{StaticResource BrushFocusAccent}" />-->
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Border
x:Name="FocusBorder"
Margin="1"
BorderBrush="Transparent"
BorderThickness="2"
CornerRadius="5" />
<Border
x:Name="MainBorder"
Margin="3"
Background="{StaticResource BrushBlackLight}"
BorderBrush="{StaticResource BrushBorderDark}"
BorderThickness="1"
CornerRadius="3"
Cursor="Hand">
<ContentPresenter
Margin="8,5,8,5"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="MainBorder" Property="Background" Value="{StaticResource BrushBlackDark}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="FocusBorder" Property="BorderBrush" Value="{StaticResource BrushFocus}" />
<Setter TargetName="MainBorder" Property="BorderBrush" Value="{StaticResource BrushFocusAccent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBoxBase}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<Border
x:Name="FocusBorder"
Height="34"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
BorderBrush="Transparent"
BorderThickness="2"
CornerRadius="3">
<Border
x:Name="MainBorder"
Height="30"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Background="{StaticResource BrushBlackLight}"
BorderBrush="{StaticResource BrushBorderDark}"
BorderThickness="1"
CornerRadius="3">
<ScrollViewer x:Name="PART_ContentHost" Margin="0" />
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="FocusBorder" Property="BorderBrush" Value="{StaticResource BrushFocus}" />
<Setter TargetName="MainBorder" Property="BorderBrush" Value="{StaticResource BrushFocusAccent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type PasswordBox}">
<Border
x:Name="FocusBorder"
Height="34"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
BorderBrush="Transparent"
BorderThickness="2"
CornerRadius="3">
<Border
x:Name="MainBorder"
Height="30"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Background="{StaticResource BrushBlackLight}"
BorderBrush="{StaticResource BrushBorderDark}"
BorderThickness="1"
CornerRadius="3">
<ScrollViewer x:Name="PART_ContentHost" Margin="0" />
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="FocusBorder" Property="BorderBrush" Value="{StaticResource BrushFocus}" />
<Setter TargetName="MainBorder" Property="BorderBrush" Value="{StaticResource BrushFocusAccent}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="30" />
</Grid.ColumnDefinitions>
<Border
x:Name="FocusBorder"
Grid.ColumnSpan="2"
Height="34"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
BorderBrush="Transparent"
BorderThickness="2"
CornerRadius="3" />
<Border
x:Name="Border"
Grid.ColumnSpan="2"
Height="30"
Margin="2,0,2,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Background="{StaticResource BrushBlackLight}"
BorderBrush="{StaticResource BrushBorderDark}"
BorderThickness="1"
CornerRadius="3" />
<Path
x:Name="Arrow"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,0 L0,2 L4,6 L8,2 L8,0 L4,4 z"
Fill="{StaticResource BrushForeground}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="FocusBorder" Property="BorderBrush" Value="{StaticResource BrushFocus}" />
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource BrushFocusAccent}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
<Border
x:Name="PART_ContentHost"
Background="{TemplateBinding Background}"
Focusable="False" />
</ControlTemplate>
<Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Grid Height="34">
<ToggleButton
Name="ToggleButton"
Grid.Column="2"
ClickMode="Press"
Focusable="false"
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Template="{StaticResource ComboBoxToggleButton}" />
<ContentPresenter
Name="ContentSite"
Margin="10,0,10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
IsHitTestVisible="False" />
<TextBox
x:Name="PART_EditableTextBox"
Margin="10,0,25,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="{TemplateBinding Background}"
BorderThickness="0"
Focusable="True"
Foreground="{StaticResource BrushForeground}"
IsHitTestVisible="False"
IsReadOnly="{TemplateBinding IsReadOnly}"
SelectionBrush="{StaticResource BrushFocus}"
Style="{x:Null}"
Template="{StaticResource ComboBoxTextBox}"
Visibility="Hidden" />
<Popup
Name="Popup"
AllowsTransparency="True"
Focusable="False"
IsOpen="{TemplateBinding IsDropDownOpen}"
Placement="Bottom"
PopupAnimation="Slide">
<Grid
Name="DropDown"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
SnapsToDevicePixels="True">
<Border
x:Name="DropDownBorder"
Background="{StaticResource BrushBlack}"
BorderBrush="{StaticResource BrushBorderLight}"
BorderThickness="1" />
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
<Trigger Property="HasItems" Value="false">
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#888888" />
</Trigger>
<Trigger Property="IsGrouping" Value="true">
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
</Trigger>
<Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
<Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0" />
<Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0" />
</Trigger>
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false" />
<Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
<Setter TargetName="ContentSite" Property="Visibility" Value="Hidden" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers />
</Style>
<!-- SimpleStyles: ComboBoxItem -->
<Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border
Name="Border"
Padding="5"
SnapsToDevicePixels="true">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="true">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource BrushFocus}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#888888" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>