-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml
1826 lines (1775 loc) · 144 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
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SkinText"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Themes="clr-namespace:Xceed.Wpf.Toolkit.Themes;assembly=Xceed.Wpf.Toolkit"
mc:Ignorable="d"
x:Class="SkinText.App"
StartupUri="MainWindow.xaml" Startup="Application_Startup">
<Application.Resources>
<!--Toolbar Area-->
<!--Font Family Area-->
<xctk:ColorModeToTabItemSelectedConverter x:Key="ColorModeToTabItemSelectedConverter"/>
<SolidColorBrush x:Key="BorderColorBrush" Color="#FF424242" />
<SolidColorBrush x:Key="MainWindowBackgroundColorBrush" Color="#55FFFFFF" />
<SolidColorBrush x:Key="RTBBackgroundColorBrush" Color="#7DFFFFFF" />
<SolidColorBrush x:Key="BackgroundColorBrush" Color="#CA1C1C1C" />
<SolidColorBrush x:Key="ButtonBackgroundColorBrush" Color="#FF262626" />
<SolidColorBrush x:Key="ButtonFrontColorBrush" Color="#FFE6E6E6" />
<SolidColorBrush x:Key="ButtonBackgroundMouseOverColorBrush" Color="#FF00B5FF" />
<SolidColorBrush x:Key="ButtonBorderMouseOverColorBrush" Color="#FFE6E6E6" />
<SolidColorBrush x:Key="ButtonBackgroundCheckedColorBrush" Color="#CD000000" />
<SolidColorBrush x:Key="ButtonBorderCheckedColorBrush" Color="#FF808080" />
<SolidColorBrush x:Key="TextColorBrush" Color="#FF808080" />
<SolidColorBrush x:Key="FontPickBackgroundColorBrush" Color="#23696969" />
<SolidColorBrush x:Key="FontPickTextColorBrush" Color="#FFE6E6E6" />
<SolidColorBrush x:Key="FontPickMouseOverBackgroundColorBrush" Color="#FF000000" />
<SolidColorBrush x:Key="FontPickMouseOverBorderColorBrush" Color="#FF00B5FF" />
<SolidColorBrush x:Key="FontPickSelectedBackgroundColorBrush" Color="#8C000000" />
<SolidColorBrush x:Key="FontPickSelectedBorderColorBrush" Color="#FFDB6929" />
<SolidColorBrush x:Key="MenuBackgroundColorBrush" Color="#C9000000" />
<SolidColorBrush x:Key="MenuItem1BorderColorBrush" Color="#00FFFFFF" />
<SolidColorBrush x:Key="MenuItem2HighlightTextColorBrush" Color="#FF00B5FF" />
<SolidColorBrush x:Key="MenuItem2HighlightBorderColorBrush" Color="#FFDB6929" />
<SolidColorBrush x:Key="MenuItem2DisabledColorBrush" Color="#73696969" />
<BitmapImage x:Key="ImageSource1CC" CreateOptions="IgnoreImageCache" CacheOption="OnLoad" UriSource="Resources\CC88x31.png" />
<BitmapImage x:Key="ImageSource1X" CreateOptions="IgnoreImageCache" CacheOption="OnLoad" UriSource="Resources\X.png" />
<BitmapImage x:Key="ImageSource1CharMap" CreateOptions="IgnoreImageCache" CacheOption="OnLoad" UriSource="Resources\CharMap.png" />
<BitmapImage x:Key="ImageSource1icon" CreateOptions="IgnoreImageCache" CacheOption="OnLoad" UriSource="Resources\icon_01.ico" />
<Style x:Key="ToolTipStyle" TargetType="{x:Type ToolTip}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="VerticalOffset" Value="-10" />
</Style>
<Style x:Key="ToolTipBorderStyle" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{DynamicResource BackgroundColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderColorBrush}" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="Padding" Value="5" />
</Style>
<Style x:Key="ToolTipTextStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14.667" />
<Setter Property="FontFamily" Value="Tahoma" />
<Setter Property="Foreground" Value="{DynamicResource TextColorBrush}" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="LabelStyle" TargetType="{x:Type Label}">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="0" />
</Style>
<Style x:Key="ButtonsStyle" TargetType="{x:Type Button}">
<Setter Property="FontSize" Value="16" />
<Setter Property="FontFamily" Value="Arial Black" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonFrontColorBrush}" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ToggleButtonsStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="FontSize" Value="16" />
<Setter Property="FontFamily" Value="Arial Black" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonFrontColorBrush}" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderCheckedColorBrush}" />
<Setter Property="BorderThickness" Value="1" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="RadioButtonsStyle" TargetType="{x:Type RadioButton}">
<Setter Property="FontSize" Value="16" />
<Setter Property="FontFamily" Value="Arial Black" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonFrontColorBrush}" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderCheckedColorBrush}" />
<Setter Property="BorderThickness" Value="1" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ListBoxStyle" TargetType="{x:Type ListBox}">
<Style.Resources>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Border" Padding="1" SnapsToDevicePixels="true" BorderThickness="1">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource FontPickMouseOverBackgroundColorBrush}"/>
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource FontPickMouseOverBorderColorBrush}"/>
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource FontPickSelectedBackgroundColorBrush}"/>
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource FontPickSelectedBorderColorBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Style.Resources>
<Setter Property="Margin" Value="5" />
<Setter Property="Foreground" Value="{DynamicResource FontPickTextColorBrush}" />
<Setter Property="Background" Value="{DynamicResource FontPickBackgroundColorBrush}" />
<Setter Property="BorderBrush" Value="{x:Null}" />
</Style>
<LinearGradientBrush x:Key="DarkBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#90939393" Offset="0.0" />
<GradientStop Color="#90717171" Offset="0.05" />
<GradientStop Color="#90606060" Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="Clicked" StartPoint="0.5,0" EndPoint="0.5,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#60363636" Offset="0.0" />
<GradientStop Color="#60393939" Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<Style x:Key="{x:Type Menu}" TargetType="{x:Type Menu}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource TextColorBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Menu}">
<Border x:Name="MainMenu" Background="{DynamicResource MenuBackgroundColorBrush}">
<DockPanel ClipToBounds="True" HorizontalAlignment="Stretch" IsItemsHost="True" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="MenuItemControlTemplate1" TargetType="{x:Type MenuItem}">
<Border x:Name="templateRoot"
BorderBrush="{DynamicResource MenuItem1BorderColorBrush}"
CornerRadius="3"
BorderThickness="1"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<Grid VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.Column="1" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Popup x:Name="PART_Popup" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Bottom" HorizontalOffset="-2">
<Border x:Name="SubMenuBorder" BorderBrush="{DynamicResource BorderColorBrush}" BorderThickness="1" Background="{DynamicResource MenuBackgroundColorBrush}" Padding="2">
<ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
<Grid RenderOptions.ClearTypeHint="Enabled">
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
<Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=SubMenuBorder}" Height="{Binding ActualHeight, ElementName=SubMenuBorder}" Width="{Binding ActualWidth, ElementName=SubMenuBorder}" />
</Canvas>
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle" />
</Grid>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSuspendingPopupAnimation" Value="True">
<Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None" />
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource DarkBrush}" />
<Setter Property="BorderBrush" TargetName="templateRoot" Value="#2C2C2C" />
<Setter Property="BorderThickness" TargetName="templateRoot" Value="1"/>
</Trigger>
<Trigger Property="CanContentScroll" SourceName="SubMenuScrollViewer" Value="False">
<Setter Property="Canvas.Top" TargetName="OpaqueRect" Value="{Binding VerticalOffset, ElementName=SubMenuScrollViewer}" />
<Setter Property="Canvas.Left" TargetName="OpaqueRect" Value="{Binding HorizontalOffset, ElementName=SubMenuScrollViewer}" />
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter TargetName="templateRoot" Property="Background" Value="{DynamicResource Clicked}" />
<Setter Property="BorderBrush" Value="#2C2C2C"/>
<Setter Property="BorderThickness" Value="1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="MenuItemControlTemplate2" TargetType="{x:Type MenuItem}">
<Border x:Name="templateRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<Grid Margin="-1">
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="22" SharedSizeGroup="MenuItemIconColumnGroup" Width="Auto" />
<ColumnDefinition Width="13" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="30" />
<ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto" />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="Icon" Content="{TemplateBinding Icon}" ContentSource="Icon" HorizontalAlignment="Center" Height="16" Margin="3" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" Width="16" />
<!-- Border x:Name="GlyphPanel" BorderBrush="#FF26A0DA" BorderThickness="1" Background="#3D26A0DA" ClipToBounds="False" HorizontalAlignment="Center" Height="22" Margin="-1,0,0,0" Visibility="Hidden" VerticalAlignment="Center" Width="22"-->
<Border x:Name="GlyphPanel" BorderBrush="{DynamicResource TextColorBrush}" BorderThickness="1" Background="{DynamicResource ButtonBackgroundColorBrush}" ClipToBounds="False" HorizontalAlignment="Center" Height="22" Margin="-1,0,0,0" Visibility="Hidden" VerticalAlignment="Center" Width="22">
<Path x:Name="Glyph" Data="F1M10,1.2L4.7,9.1 4.5,9.1 0,5.2 1.3,3.5 4.3,6.1 8.3,0 10,1.2z" Fill="{DynamicResource TextColorBrush}" FlowDirection="LeftToRight" Height="11" Width="10" />
</Border>
<ContentPresenter x:Name="menuHeaderContainer" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.Column="2" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
<TextBlock x:Name="menuGestureText" Grid.Column="4" Margin="{TemplateBinding Padding}" Opacity="0.7" Text="{TemplateBinding InputGestureText}" VerticalAlignment="Center" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Icon" Value="{x:Null}">
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource DarkBrush}" />
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource MenuItem2HighlightBorderColorBrush}" />
<Setter Property="TextBlock.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource MenuItem2HighlightTextColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Fill" TargetName="Glyph" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
</Trigger>
<MultiTrigger>
<!--Never triggers?-->
<MultiTrigger.Conditions>
<Condition Property="IsHighlighted" Value="True" />
<Condition Property="IsEnabled" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="#0A000000" />
<Setter Property="BorderBrush" TargetName="templateRoot" Value="#21000000" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--Toolbar Area-->
<Style x:Key="{x:Type ToolBarTray}" TargetType="{x:Type ToolBarTray}">
<Setter Property="Background" Value="{DynamicResource MenuBackgroundColorBrush}"/>
</Style>
<Style x:Key="ToolBarOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="Border" CornerRadius="0,3,3,0" SnapsToDevicePixels="true" Background="{DynamicResource MenuBackgroundColorBrush}">
<Grid>
<Path x:Name="Arrow" Fill="{DynamicResource ButtonFrontColorBrush}" VerticalAlignment="Bottom" Margin="2,3" Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" />
<ContentPresenter />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="Border" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" TargetName="Border" Value="0.6" />
<Setter Property="Visibility" Value="Collapsed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Cursor" Value="SizeAll" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Background="Transparent" SnapsToDevicePixels="True">
<Rectangle Margin="0,2">
<Rectangle.Fill>
<DrawingBrush Viewport="0,0,4,4" ViewportUnits="Absolute" Viewbox="0,0,8,8" ViewboxUnits="Absolute" TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{DynamicResource ButtonBackgroundMouseOverColorBrush}" Geometry="M 4 4 L 4 8 L 8 8 L 8 4 z" />
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Rectangle.Fill>
</Rectangle>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type ToolBar}" TargetType="{x:Type ToolBar}">
<Setter Property="FontSize" Value="14.667" />
<Setter Property="FontFamily" Value="Tahoma" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextColorBrush}" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="2,0,0,1" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToolBar}">
<Border x:Name="Border" CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<DockPanel>
<ToggleButton DockPanel.Dock="Right" IsEnabled="{TemplateBinding HasOverflowItems}"
Style="{DynamicResource ToolBarOverflowButtonStyle}" ClickMode="Press"
IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<Popup x:Name="OverflowPopup" AllowsTransparency="true"
Placement="Bottom" StaysOpen="false" Focusable="false"
PopupAnimation="Slide"
IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}">
<Border x:Name="DropDownBorder" BorderBrush="{DynamicResource BorderColorBrush}" BorderThickness="1" Background="{DynamicResource ButtonBackgroundColorBrush}" Padding="2">
<ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel" Margin="0"
WrapWidth="200" Focusable="true"
FocusVisualStyle="{x:Null}"
KeyboardNavigation.TabNavigation="Cycle"
KeyboardNavigation.DirectionalNavigation="Cycle"
Background="{TemplateBinding Background}" />
</Border>
</Popup>
</ToggleButton>
<Thumb x:Name="ToolBarThumb" Style="{DynamicResource ToolBarThumbStyle}" Width="5" />
<ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" Margin="0,1,2,2" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsOverflowOpen" Value="true">
<Setter TargetName="ToolBarThumb" Property="IsEnabled" Value="false" />
</Trigger>
<Trigger Property="ToolBarTray.IsLocked" Value="true">
<Setter TargetName="ToolBarThumb" Property="Visibility" Value="Collapsed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Static ToolBar.ButtonStyleKey}" TargetType="{x:Type Button}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent">
<ContentPresenter Margin="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="Border" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" TargetName="Border" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Static ToolBar.ToggleButtonStyleKey}" TargetType="{x:Type ToggleButton}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="Border" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent">
<ContentPresenter Margin="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="Border" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" TargetName="Border" Value="0.6" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderCheckedColorBrush}" />
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}" TargetType="{x:Type RadioButton}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border x:Name="Border" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent">
<ContentPresenter Margin="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="Border" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" TargetName="Border" Value="0.6" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderCheckedColorBrush}" />
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}" TargetType="{x:Type CheckBox}">
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Border x:Name="Border" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent">
<ContentPresenter Margin="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="Border" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" TargetName="Border" Value="0.6" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderCheckedColorBrush}" />
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" TargetType="{x:Type TextBox}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border x:Name="Border" Padding="2" BorderThickness="1" Background="{DynamicResource MenuBackgroundColorBrush}" BorderBrush="{DynamicResource MenuBackgroundColorBrush}">
<ScrollViewer Margin="0" x:Name="PART_ContentHost" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="Border" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" TargetName="Border" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Color Picker Area-->
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<xctk:InverseBoolConverter x:Key="InverseBoolConverter" />
<xctk:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter" />
<DrawingBrush x:Key="CheckerBrush" Viewport="0,0,10,10" ViewportUnits="Absolute" TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="White">
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0 100,100" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="LightGray">
<GeometryDrawing.Geometry>
<GeometryGroup>
<RectangleGeometry Rect="0,0 50,50" />
<RectangleGeometry Rect="50,50 50,50" />
</GeometryGroup>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
<Style x:Key="ColorItemContainerStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="ToolTip" Value="{Binding Name}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid x:Name="mainGrid"
ToolTip="{Binding Name}">
<Grid.Resources>
<Style TargetType="{x:Type ToolTip}">
<Style.Triggers>
<Trigger Property="Content"
Value="">
<Setter Property="Visibility"
Value="Collapsed" />
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
<Border BorderThickness="1" Background="Transparent" BorderBrush="Transparent" x:Name="_outerBorder" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Border Background="Transparent" BorderThickness="1" BorderBrush="Transparent" x:Name="_innerBorder" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="_outerBorder" Property="BorderBrush" Value="#FFFF0000" />
<Setter TargetName="_innerBorder" Property="BorderBrush" Value="#FFFFFF00" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="_outerBorder" Property="BorderBrush" Value="#FFFF0000" />
<Setter TargetName="_innerBorder" Property="BorderBrush" Value="#FFFFFF00" />
</Trigger>
<DataTrigger Binding="{Binding DisplayColorAndName, RelativeSource={RelativeSource AncestorType={x:Type xctk:ColorPicker}}}"
Value="False">
<Setter Property="ToolTip"
Value=""
TargetName="mainGrid" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="ColorItemTemplate">
<Grid>
<Border Background="{StaticResource CheckerBrush}" BorderBrush="Black" BorderThickness="1" Margin="2,2,2,2">
<Rectangle Width="14" Height="14">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{Binding Color, Converter={StaticResource ColorToSolidColorBrushConverter}}" />
</Style>
</Rectangle.Style>
</Rectangle>
</Border>
</Grid>
</DataTemplate>
<Style x:Key="ColorPickerToggleButtonStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<xctk:ButtonChrome x:Name="ToggleButtonChrome" Background="{DynamicResource ButtonBackgroundColorBrush}" BorderBrush="{x:Null}"
Grid.Column="1"
Visibility="{Binding ShowDropDownButton, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type xctk:ColorPicker}, Mode=FindAncestor}}">
<!--
RenderChecked="{Binding IsOpen, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=xctk:ColorPicker}}"
RenderEnabled="{Binding IsEnabled, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=xctk:ColorPicker}}"
RenderMouseOver="{TemplateBinding IsMouseOver}"
RenderPressed="{TemplateBinding IsPressed}"
-->
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5">
<Path x:Name="Arrow"
Width="9"
Height="5"
Data="M0,0 L3,0 4.5,1.5 6,0 9,0 4.5,4.5 z"
Fill="{DynamicResource ButtonFrontColorBrush}"
Margin="0,1,0,0" />
</Grid>
</xctk:ButtonChrome>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="ToggleButtonChrome" Value="{DynamicResource ButtonBackgroundMouseOverColorBrush}" />
<Setter Property="BorderBrush" TargetName="ToggleButtonChrome" Value="{DynamicResource ButtonBorderMouseOverColorBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="ToggleButtonChrome" Value="{DynamicResource ButtonBackgroundCheckedColorBrush}" />
<Setter Property="BorderBrush" TargetName="ToggleButtonChrome" Value="{DynamicResource ButtonBorderCheckedColorBrush}" />
<Setter Property="BorderThickness" Value="1" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="ToggleButtonChrome" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Fill" TargetName="Arrow" Value="{DynamicResource MenuItem2DisabledColorBrush}" />
<Setter Property="Opacity" TargetName="ToggleButtonChrome" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ColorDisplayStyle" TargetType="{x:Type ContentControl}">
<Setter Property="Focusable" Value="False" />
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Border Background="{StaticResource ButtonBackgroundColorBrush}">
<Rectangle Fill="{Binding SelectedColor, Converter={StaticResource ColorToSolidColorBrushConverter}, RelativeSource={RelativeSource AncestorType={x:Type xctk:ColorPicker}, Mode=FindAncestor}}" />
</Border>
</DataTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding SelectedColor, RelativeSource={RelativeSource AncestorType={x:Type xctk:ColorPicker}, Mode=FindAncestor}}"
Value="{x:Null}">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="ColorListStyle" TargetType="{x:Type ListBox}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Width="200" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle" Value="{StaticResource ColorItemContainerStyle}" />
<Setter Property="ItemTemplate" Value="{StaticResource ColorItemTemplate}" />
<Setter Property="SelectionMode" Value="Single" />
</Style>
<Style x:Key="ColorPickerStyle" TargetType="{x:Type xctk:ColorPicker}">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColorBrush}" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="1,1,0,1" />
<Setter Property="ButtonStyle" Value="{DynamicResource ColorPickerToggleButtonStyle}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MaxDropDownWidth" Value="253" />
<Setter Property="ShowRecentColors" Value="True" />
<Setter Property="AvailableColorsSortingMode" Value="HueSaturationBrightness" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type xctk:ColorPicker}">
<Grid>
<ToggleButton x:Name="PART_ColorPickerToggleButton"
IsTabStop="True"
MinHeight="22"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="{TemplateBinding Padding}"
IsHitTestVisible="{Binding IsOpen, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource TemplatedParent}}"
IsChecked="{Binding IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Style="{TemplateBinding ButtonStyle}"
>
<Grid Margin="2">
<ContentControl x:Name="ColorOnly" Style="{StaticResource ColorDisplayStyle}" />
<Border x:Name="ColorAndName" Background="White" Visibility="Hidden">
<StackPanel Orientation="Horizontal">
<ContentControl
HorizontalAlignment="Left"
Width="20"
Margin="2,1,4,1"
Style="{StaticResource ColorDisplayStyle}"
BorderThickness="1"
BorderBrush="{DynamicResource {ComponentResourceKey ResourceId=ControlNormalBorderKey, TypeInTargetAssembly={x:Type Themes:ResourceKeys}}}"
/>
<TextBlock Text="{Binding SelectedColorText, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center"/>
</StackPanel>
</Border>
</Grid>
</ToggleButton>
<Popup x:Name="PART_ColorPickerPalettePopup"
AllowsTransparency="True"
Focusable="False"
HorizontalOffset="1"
IsOpen="{Binding IsChecked, ElementName=PART_ColorPickerToggleButton}"
PopupAnimation="Slide"
StaysOpen="False"
ToolTip=""
VerticalOffset="1"
VerticalAlignment="Bottom">
<Popup.Resources>
<Style TargetType="{x:Type ToolTip}">
<Style.Triggers>
<Trigger Property="Content" Value="">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
</Style.Triggers>
</Style>
</Popup.Resources>
<Border BorderThickness="1"
Background="{DynamicResource BackgroundColorBrush}"
BorderBrush="{DynamicResource BorderColorBrush}"
Padding="3">
<TabControl x:Name="ColorPickerTabControl" Background="{DynamicResource BackgroundColorBrush}"
SelectedIndex="{Binding ColorMode, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ColorModeToTabItemSelectedConverter}}">
<xctk:ColorPickerTabItem x:Name="StandardTabItem" Header="{Binding StandardButtonHeader, RelativeSource={RelativeSource TemplatedParent}}">
<xctk:ColorPickerTabItem.Template>
<ControlTemplate TargetType="{x:Type xctk:ColorPickerTabItem}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="True">
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{DynamicResource ButtonBackgroundColorBrush}" Margin="0">
<Border x:Name="innerBorder" BorderBrush="#FFACACAC" BorderThickness="1,1,1,0" Background="{DynamicResource ButtonBackgroundColorBrush}" Margin="-1" Opacity="0"/>
</Border>
<ContentPresenter x:Name="contentPresenter"
TextBlock.Foreground="{DynamicResource ButtonFrontColorBrush}"
ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" Focusable="False" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="Margin" Value="-2,-2,-2,0"/>
<Setter Property="Opacity" TargetName="innerBorder" Value="1"/>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</xctk:ColorPickerTabItem.Template>
<Grid x:Name="_colorPaletteHost" Margin="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Available Colors -->
<Grid Grid.Row="1" Visibility="{TemplateBinding ShowAvailableColors, Converter={StaticResource BooleanToVisibilityConverter}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Background="{DynamicResource ButtonBackgroundColorBrush}"
Foreground="{DynamicResource ButtonFrontColorBrush}"
Margin="0,0,0,1" Padding="2"
Text="{TemplateBinding AvailableColorsHeader}"/>
<ListBox x:Name="PART_AvailableColors" Grid.Row="1"
ItemsSource="{Binding AvailableColors, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ColorListStyle}" />
</Grid>
</Grid>
<!-- Standard Colors-->
<Grid Grid.Row="2" Visibility="{TemplateBinding ShowStandardColors, Converter={StaticResource BooleanToVisibilityConverter}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Background="{DynamicResource ButtonBackgroundColorBrush}" Foreground="{DynamicResource ButtonFrontColorBrush}" Margin="0,1" Padding="2" Text="{TemplateBinding StandardColorsHeader}"/>
<ListBox x:Name="PART_StandardColors" Grid.Row="1"
ItemsSource="{Binding StandardColors, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ColorListStyle}" />
</Grid>
</Grid>
<!-- Recent Colors-->
<Grid Margin="0,1" Grid.Row="3" Visibility="{TemplateBinding ShowRecentColors, Converter={StaticResource BooleanToVisibilityConverter}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
</Grid.RowDefinitions>
<TextBlock Background="{DynamicResource ButtonBackgroundColorBrush}" Foreground="{DynamicResource ButtonFrontColorBrush}" Margin="0,1" Padding="2" Text="{TemplateBinding RecentColorsHeader}"/>
<ListBox x:Name="PART_RecentColors" Grid.Row="1"
ItemsSource="{Binding RecentColors, RelativeSource={RelativeSource TemplatedParent}}"
Style="{StaticResource ColorListStyle}" />
</Grid>
</Grid>
</Grid>
</xctk:ColorPickerTabItem>
<xctk:ColorPickerTabItem x:Name="AdvancedTabItem" Header="{Binding AdvancedButtonHeader, RelativeSource={RelativeSource TemplatedParent}}">
<xctk:ColorPickerTabItem.Template>
<ControlTemplate TargetType="{x:Type xctk:ColorPickerTabItem}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="True">
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{DynamicResource ButtonBackgroundColorBrush}" Margin="0">
<Border x:Name="innerBorder" BorderBrush="#FFACACAC" BorderThickness="1,1,1,0" Background="{DynamicResource ButtonBackgroundColorBrush}" Margin="-1" Opacity="0"/>
</Border>
<ContentPresenter x:Name="contentPresenter"
TextBlock.Foreground="{DynamicResource ButtonFrontColorBrush}"
ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" Focusable="False" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Panel.ZIndex" Value="1"/>
<Setter Property="Margin" Value="-2,-2,-2,0"/>
<Setter Property="Opacity" TargetName="innerBorder" Value="1"/>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</xctk:ColorPickerTabItem.Template>
<!-- ColorCanvas -->
<Grid x:Name="_colorCanvasHost">
<xctk:ColorCanvas BorderThickness="0"
Background="Transparent"
Foreground="{DynamicResource ButtonFrontColorBrush}" FontWeight="Bold"
SelectedColor="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"
UsingAlphaChannel="{Binding UsingAlphaChannel, RelativeSource={RelativeSource TemplatedParent}}"
Style="{DynamicResource ColorCanvasStyle1}">
<xctk:ColorCanvas.Width>
<Binding ConverterParameter="-18" Path="MaxDropDownWidth" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<xctk:AdditionConverter/>
</Binding.Converter>
</Binding>
</xctk:ColorCanvas.Width>
</xctk:ColorCanvas>
</Grid>
</xctk:ColorPickerTabItem>
</TabControl>
</Border>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="DisplayColorAndName" Value="True">
<Setter Property="Visibility" TargetName="ColorOnly" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="ColorAndName" Value="Visible"/>
</Trigger>
<Trigger Property="ShowTabHeaders" Value="False">
<Setter Property="Visibility" TargetName="StandardTabItem" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="AdvancedTabItem" Value="Collapsed"/>
</Trigger>
<Trigger Property="ShowDropDownButton" Value="False">
<Setter Property="BorderThickness" Value="1"/>