Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Resources.xaml « Themes « Xamarin.PropertyEditing.Windows - github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 558c2a24b74eefb9ad2f6826114cf1d638c66eab (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Xamarin.PropertyEditing.Windows"
                    xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
                    xmlns:vm="clr-namespace:Xamarin.PropertyEditing.ViewModels;assembly=Xamarin.PropertyEditing"
                    xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
                    xmlns:prop="clr-namespace:Xamarin.PropertyEditing.Properties;assembly=Xamarin.PropertyEditing">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="MenuButtonStyle.xaml" />
        <ResourceDictionary Source="PropertyEditorPanelStyle.xaml" />
    </ResourceDictionary.MergedDictionaries>

	<BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" />

	<Color x:Key="DropShadowBackgroundColor">#72000000</Color>

	<Style TargetType="{x:Type local:EnumEditorControl}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:EnumEditorControl}">
					<ComboBox x:Name="ComboBox" ItemsSource="{Binding PossibleValues}" SelectedItem="{Binding ValueName}" VerticalContentAlignment="Center" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="ChoiceControlItem" BasedOn="{StaticResource {x:Type RadioButton}}" TargetType="RadioButton">
		<Setter Property="Background" Value="{DynamicResource ToggleItemBackgroundBrush}" />
		<Setter Property="BorderBrush" Value="{DynamicResource ToggleItemBorderBrush}" />
		<Setter Property="Foreground" Value="{DynamicResource ToggleItemForegroundBrush}" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="Padding" Value="4,2,4,2" />
		<Setter Property="Margin" Value="1,0,0,0" />
		<Setter Property="FocusVisualStyle" Value="{x:Null}" />
		<Setter Property="ToolTip" Value="{Binding Tooltip}" />
		<Setter Property="AutomationProperties.Name" Value="{Binding Name}" />
		<Setter Property="AutomationProperties.HelpText" Value="{Binding Tooltip}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RadioButton">
					<Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Padding="{TemplateBinding Padding}">
						<ContentPresenter />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="IsChecked" Value="True">
				<Setter Property="BorderBrush" Value="{DynamicResource ToggleItemSelectedBorderBrush}" />
				<Setter Property="Background" Value="{DynamicResource ToggleItemSelectedBackgroundBrush}" />
				<Setter Property="Foreground" Value="{DynamicResource ToggleItemSelectedForegroundBrush}" />
			</Trigger>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="Background" Value="{DynamicResource ToggleItemMouseOverBackgroundBrush}" />
				<Setter Property="Foreground" Value="{DynamicResource ToggleItemMouseOverForegroundBrush}" />
			</Trigger>
			<Trigger Property="IsFocused" Value="True">
				<Setter Property="Background" Value="{DynamicResource ToggleItemMouseOverBackgroundBrush}" />
			</Trigger>
			<Trigger Property="IsPressed" Value="True">
				<Setter Property="BorderBrush" Value="{DynamicResource ToggleItemPressedBorderBrush}" />
				<Setter Property="Background" Value="{DynamicResource ToggleItemPressedBackgroundBrush}" />
			</Trigger>
		</Style.Triggers>
	</Style>

	<Style x:Key="PanelChoiceItem" BasedOn="{StaticResource ChoiceControlItem}" TargetType="RadioButton">
		<Setter Property="Padding" Value="1" />
		<Setter Property="Width" Value="22" />
	</Style>

	<Style TargetType="{x:Type local:ChoiceControl}">
		<Setter Property="Padding" Value="0" />
		<Setter Property="BorderThickness" Value="0,1,1,1" />
		<Setter Property="BorderBrush" Value="{DynamicResource ToggleItemOuterBorderBrush}" />
		<Setter Property="Background" Value="{DynamicResource ToggleItemOuterBorderBrush}" />
		<Setter Property="Focusable" Value="False" />
		<Setter Property="SelectedValuePath" Value="Value" />
		<Setter Property="ItemTemplate">
			<Setter.Value>
				<DataTemplate>
					<RadioButton Style="{DynamicResource ChoiceControlItem}" GroupName="{Binding Name,RelativeSource={RelativeSource FindAncestor,AncestorType=local:ChoiceControl},Mode=OneTime}">
						<Image Height="16" Width="16" Margin="-1" />
					</RadioButton>
				</DataTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<StackPanel Orientation="Horizontal" />
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="PanelChoice" BasedOn="{StaticResource {x:Type local:ChoiceControl}}" TargetType="local:ChoiceControl">
		<Setter Property="ItemTemplate">
			<Setter.Value>
				<DataTemplate>
					<RadioButton Style="{DynamicResource PanelChoiceItem}" GroupName="{Binding Name,RelativeSource={RelativeSource FindAncestor,AncestorType=local:ChoiceControl},Mode=OneTime}">
						<Image Height="16" Width="16" Margin="-1" />
					</RadioButton>
				</DataTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<local:NumericTemplateSelector x:Key="NumericTemplateSelector">
		<local:NumericTemplateSelector.FloatingTemplate>
			<DataTemplate DataType="vm:FloatingPropertyViewModel">
				<local:DoubleUpDownControl Value="{Binding Value}" MaximumValue="{Binding MaximumValue}" MinimumValue="{Binding MinimumValue}" IsConstrained="{Binding IsConstrained,Mode=OneTime}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" />
			</DataTemplate>
		</local:NumericTemplateSelector.FloatingTemplate>
		<local:NumericTemplateSelector.IntegerTemplate>
			<DataTemplate DataType="vm:IntegerPropertyViewModel">
				<local:IntegerUpDownControl Value="{Binding Value}" MaximumValue="{Binding MaximumValue}" MinimumValue="{Binding MinimumValue}" IsConstrained="{Binding IsConstrained,Mode=OneTime}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" />
			</DataTemplate>
		</local:NumericTemplateSelector.IntegerTemplate>
		<local:NumericTemplateSelector.ByteTemplate>
			<DataTemplate DataType="vm:BytePropertyViewModel">
				<local:ByteUpDownControl Value="{Binding Value}" MaximumValue="{Binding MaximumValue}" MinimumValue="{Binding MinimumValue}" IsConstrained="{Binding IsConstrained,Mode=OneTime}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}" />
			</DataTemplate>
		</local:NumericTemplateSelector.ByteTemplate>
	</local:NumericTemplateSelector>

	<Style TargetType="local:NumericEditorControl">
		<Setter Property="Height" Value="24" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:NumericEditorControl">
					<ContentPresenter Content="{Binding}" ContentTemplateSelector="{StaticResource NumericTemplateSelector}" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:IntegerUpDownControl">
		<Setter Property="Height" Value="24" />
		<Setter Property="ShowSpinner" Value="False" />
		<Setter Property="MinHeight" Value="20" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:IntegerUpDownControl}">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*" />
							<ColumnDefinition Width="Auto" />
						</Grid.ColumnDefinitions>

						<TextBox Name="TextBox" IsEnabled="{TemplateBinding IsEnabled}" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" Grid.Column="0" VerticalContentAlignment="Center" />

						<StackPanel Grid.Column="1" Visibility="{TemplateBinding ShowSpinner,Converter={StaticResource BoolToVisibilityConverter}}">
							<Button x:Name="Up" IsEnabled="{TemplateBinding IsEnabled}" FontSize="8" FontFamily="Segoe UI Symbol" Content="⋀" />
							<Button x:Name="Down" IsEnabled="{TemplateBinding IsEnabled}" FontSize="8" FontFamily="Segoe UI Symbol" Content="⋁" />
						</StackPanel>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style TargetType="local:DoubleUpDownControl">
		<Setter Property="Height" Value="24" />
		<Setter Property="ShowSpinner" Value="False" />
		<Setter Property="MinHeight" Value="20" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:DoubleUpDownControl}">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*" />
							<ColumnDefinition Width="Auto" />
						</Grid.ColumnDefinitions>

						<TextBox Name="TextBox" IsEnabled="{TemplateBinding IsEnabled}" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" Grid.Column="0" VerticalContentAlignment="Center" />

						<StackPanel Grid.Column="1" Visibility="{TemplateBinding ShowSpinner,Converter={StaticResource BoolToVisibilityConverter}}">
							<Button x:Name="Up" IsEnabled="{TemplateBinding IsEnabled}" FontSize="8" FontFamily="Segoe UI Symbol" Content="⋀" />
							<Button x:Name="Down" IsEnabled="{TemplateBinding IsEnabled}" FontSize="8" FontFamily="Segoe UI Symbol" Content="⋁" />
						</StackPanel>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:ByteUpDownControl">
		<Setter Property="Height" Value="24" />
		<Setter Property="ShowSpinner" Value="False" />
		<Setter Property="MinHeight" Value="20" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:ByteUpDownControl}">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*" />
							<ColumnDefinition Width="Auto" />
						</Grid.ColumnDefinitions>

						<TextBox Name="TextBox" IsEnabled="{TemplateBinding IsEnabled}" AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}" Grid.Column="0" VerticalContentAlignment="Center" />

						<StackPanel Grid.Column="1" Visibility="{TemplateBinding ShowSpinner,Converter={StaticResource BoolToVisibilityConverter}}">
							<Button x:Name="Up" IsEnabled="{TemplateBinding IsEnabled}" FontSize="8" FontFamily="Segoe UI Symbol" Content="⋀" />
							<Button x:Name="Down" IsEnabled="{TemplateBinding IsEnabled}" FontSize="8" FontFamily="Segoe UI Symbol" Content="⋁" />
						</StackPanel>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:StringEditorControl">
		<Setter Property="Height" Value="24" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:StringEditorControl">
					<TextBox Name="TextBox" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" Text="{Binding Value}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" VerticalContentAlignment="Center" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:BoolEditorControl">
		<Setter Property="Height" Value="24" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:BoolEditorControl">
					<CheckBox Name="CheckBox" Height="{TemplateBinding Height}" VerticalContentAlignment="Center" AutomationProperties.Name="{Binding Property.Name,Mode=OneTime}" IsChecked="{Binding Value}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" VerticalAlignment="Center" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style TargetType="local:PointEditorControl">
		<Setter Property="Height" Value="24" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:PointEditorControl">
                    <StackPanel Name="StackPanel" Orientation="Horizontal">
                        <Label Name="XLabel" Target="{Binding ElementName=XTextBox,Mode=OneTime}" Content="X" />
                        <local:DoubleUpDownControl x:Name="XTextBox" Value="{Binding X}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.LabeledBy="{Binding ElementName=XLabel,Mode=OneTime}"/>
                        <Label Name="YLabel" Target="{Binding ElementName=YTextBox,Mode=OneTime}" Content="Y" />
                        <local:DoubleUpDownControl x:Name="YTextBox" Value="{Binding Y}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.LabeledBy="{Binding ElementName=YLabel,Mode=OneTime}" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:SizeEditorControl">
	    <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:SizeEditorControl">
                    <Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>
						<Label Grid.Column="0" Name="WidthLabel" Target="{Binding ElementName=WidthTextBox,Mode=OneTime}" Content="Width" />
						<local:DoubleUpDownControl Grid.Column="1" Value="{Binding Width}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.LabeledBy="{Binding ElementName=WidthLabel,Mode=OneTime}"/>
						<Label Name="HeightLabel" Grid.Column="2" Target="{Binding ElementName=HeightTextBox,Mode=OneTime}" Content="Height" />
						<local:DoubleUpDownControl Grid.Column="3" Value="{Binding Height}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.LabeledBy="{Binding ElementName=HeightLabel,Mode=OneTime}"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<PathGeometry x:Key="RightThicknessGeometry" options:Freeze="True" Figures="M3,8 L7,8 7,5.5 11,9.5 7,13.5 7,11 3,11 z" />
	<PathGeometry x:Key="TopThicknessGeometry" options:Freeze="True" Figures="M7.5,5 L11.5,9 9,9 9,13 6,13 6,9 3.5,9 z" />
	<PathGeometry x:Key="LeftThicknessGeometry" options:Freeze="True" Figures="M11,8 L7,8 7,5.5 3,9.5 7,13.5 7,11 11,11 z" />
	<PathGeometry x:Key="BottomThicknessGeometry" options:Freeze="True" Figures="M7.5,13 L11.5,9 9,9 9,5 6,5 6,9 3.5,9 z" />

	<Style x:Key="EditorIconLabelHost" TargetType="Border">
		<Setter Property="Background" Value="{DynamicResource ThicknessIconBackgroundBrush}" />
		<Setter Property="BorderBrush" Value="{DynamicResource ThicknessIconBorderBrush}" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="Width" Value="20" />
		<Setter Property="VerticalAlignment" Value="Stretch" />
		<Setter Property="HorizontalAlignment" Value="Left" />
	</Style>

	<Style x:Key="ThicknessIconStyle" TargetType="Path">
		<Setter Property="Stroke" Value="{DynamicResource InputForegroundBrush}" />
		<Setter Property="Fill" Value="{DynamicResource InputForegroundBrush}" />
		<Setter Property="VerticalAlignment" Value="Center" />
	</Style>
	
	<Style TargetType="local:ThicknessEditorControl">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:ThicknessEditorControl">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition />
							<RowDefinition />
						</Grid.RowDefinitions>

						<Border Grid.Column="0" Grid.Row="0" Style="{StaticResource EditorIconLabelHost}">
							<Path Style="{StaticResource ThicknessIconStyle}" Data="{StaticResource LeftThicknessGeometry}" />
						</Border>
						<local:IntegerUpDownControl Grid.Column="0" Grid.Row="0" Margin="14,0,2,0" Value="{Binding Value.Left}" MaximumValue="{Binding MaximumValue}" MinimumValue="{Binding MinimumValue}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.HelpText="Left" />
						<Border Grid.Column="1" Grid.Row="0" Style="{StaticResource EditorIconLabelHost}">
							<Path Style="{StaticResource ThicknessIconStyle}" Data="{StaticResource RightThicknessGeometry}" />
						</Border>
						<local:IntegerUpDownControl Grid.Column="1" Grid.Row="0" Margin="14,0,2,0" Value="{Binding Value.Right}" MaximumValue="{Binding MaximumValue}" MinimumValue="{Binding MinimumValue}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.HelpText="Right" />
						<Border Grid.Column="0" Grid.Row="1" Style="{StaticResource EditorIconLabelHost}" Margin="0,4,0,0">
							<Path Style="{StaticResource ThicknessIconStyle}" Data="{StaticResource TopThicknessGeometry}" />
						</Border>
						<local:IntegerUpDownControl Grid.Column="0" Grid.Row="1" Margin="14,4,2,0" Value="{Binding Value.Top}" MaximumValue="{Binding MaximumValue}" MinimumValue="{Binding MinimumValue}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.HelpText="Top" />
						<Border Grid.Column="1" Grid.Row="1" Style="{StaticResource EditorIconLabelHost}" Margin="0,4,0,0">
							<Path Style="{StaticResource ThicknessIconStyle}" Data="{StaticResource BottomThicknessGeometry}" />
						</Border>
						<local:IntegerUpDownControl Grid.Column="1" Grid.Row="1" Margin="14,4,2,0" Value="{Binding Value.Bottom}" MaximumValue="{Binding MaximumValue}" MinimumValue="{Binding MinimumValue}" IsEnabled="{Binding Property.CanWrite,Mode=OneTime}" AutomationProperties.HelpText="Bottom" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:SolidBrushEditorControl">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:SolidBrushEditorControl">
					<Grid VerticalAlignment="Top" Margin="0,6,0,0" MinHeight="180">
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="*"/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*" MinWidth="200"/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<ComboBox Name="colorSpacePicker" Grid.ColumnSpan="2" Grid.Row="0" Grid.Column="0" ItemsSource="{Binding ColorSpaces}"
								  SelectedItem="{Binding Value.ColorSpace, Mode=OneTime}" VerticalContentAlignment="Center" AutomationProperties.HelpText="{x:Static prop:Resources.ColorSpace}" ToolTip="{x:Static prop:Resources.ColorSpace}"/>
						<Grid Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
							<Grid.RowDefinitions>
								<RowDefinition Height="*"/>
								<RowDefinition Height="Auto"/>
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*"/>
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>
							<local:ShadeEditorControl x:Name="shadeChooser" Color="{Binding Path=Shade, Mode=TwoWay}" HueColor="{Binding Path=HueColor, Mode=OneWay}"
													  Grid.Column="0" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,6,0,1" Panel.ZIndex="1"/>
							<local:HueEditorControl x:Name="hueChooser" HueColor="{Binding Path=HueColor, Mode=TwoWay}"
													Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,6,3,1" Panel.ZIndex="0" Focusable="False"/>
							<local:CurrentColorEditorControl Color="{Binding Path=Shade, Mode=TwoWay}" InitialColor="{Binding InitialColor}" LastColor="{Binding LastColor}"
															 Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Height="20" Margin="0,0,1,0" Panel.ZIndex="0" Focusable="False"/>
						</Grid>
						<local:ColorComponentsEditorControl x:Name="componentEditor" Color="{Binding Path=Shade, Mode=TwoWay}" Margin="0,4,0,0"
															Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Focusable="False"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:HueEditorControl">
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:HueEditorControl">
					<Grid>
						<Rectangle Name="hueChooser" Grid.Column="0" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="20" Stroke="Transparent" StrokeThickness="0">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
									<GradientStop Color="Red" Offset="0"/>
									<GradientStop Color="Yellow" Offset="0.167"/>
									<GradientStop Color="Lime" Offset="0.333"/>
									<GradientStop Color="Cyan" Offset="0.500"/>
									<GradientStop Color="Blue" Offset="0.667"/>
									<GradientStop Color="Magenta" Offset="0.833"/>
									<GradientStop Color="Red" Offset="1"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Canvas Name="cursorCanvas" Grid.Column="0" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="20" Panel.ZIndex="1" ClipToBounds="True">
							<Canvas Width="{Binding ActualWidth, ElementName=cursorCanvas}" Height="{Binding ActualHeight, ElementName=cursorCanvas}"
									Canvas.Top="{TemplateBinding CursorPosition}">
								<Canvas.RenderTransform><TranslateTransform X="0" Y="-4"/></Canvas.RenderTransform>
								<Polygon Points="0,0 5,5 0,10" Stroke="{DynamicResource HuePickerCursorBrush}" Fill="{DynamicResource HuePickerCursorBrush}"/>
								<Polygon Points="20,0 15,5 20,10" Stroke="{DynamicResource HuePickerCursorBrush}" Fill="{DynamicResource HuePickerCursorBrush}"/>
							</Canvas>
						</Canvas>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:ShadeEditorControl">
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:ShadeEditorControl">
					<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
						<Rectangle Name="saturationLayer" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" Stroke="Transparent" StrokeThickness="0" VerticalAlignment="Stretch">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
									<GradientStop Color="White" Offset="0"/>
									<GradientStop Color="Red" Offset="1"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Rectangle Name="brightnessLayer" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" Stroke="Transparent" StrokeThickness="0" VerticalAlignment="Stretch" Panel.ZIndex="1">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#00000000" Offset="0"/>
									<GradientStop Color="Black" Offset="1"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Canvas Name="cursor" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" Panel.ZIndex="2" IsHitTestVisible="False">
							<Canvas.RenderTransform><TranslateTransform X="-6" Y="-6"/></Canvas.RenderTransform>
							<Rectangle IsHitTestVisible="False" Width="12" Height="12" StrokeThickness="0"
									Canvas.Left="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CursorPosition.X}"
									Canvas.Top="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CursorPosition.Y}">
								<Rectangle.Fill>
									<RadialGradientBrush Center="0.5,0.5" GradientOrigin="0.5,0.5">
										<RadialGradientBrush.GradientStops>
											<GradientStop Offset="0" Color="Transparent"/>
											<GradientStop Offset="0.5" Color="Transparent"/>
											<GradientStop Offset="0.5" Color="{DynamicResource ShadePickerCursorOutlineColor}"/>
											<GradientStop Offset="0.67" Color="{DynamicResource ShadePickerCursorOutlineColor}"/>
											<GradientStop Offset="0.67" Color="{DynamicResource ShadePickerCursorStrokeColor}"/>
											<GradientStop Offset="0.83" Color="{DynamicResource ShadePickerCursorStrokeColor}"/>
											<GradientStop Offset="0.83" Color="{DynamicResource ShadePickerCursorOutlineColor}"/>
											<GradientStop Offset="1" Color="{DynamicResource ShadePickerCursorOutlineColor}"/>
											<GradientStop Offset="1" Color="Transparent"/>
										</RadialGradientBrush.GradientStops>
									</RadialGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
						</Canvas>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:ColorComponentsEditorControl">
		<Setter Property="Focusable" Value="False"/>
		<Setter Property="ContextMenu">
			<Setter.Value>
				<ContextMenu Placement="Bottom">
					<MenuItem Name="hlsMenuItem" Header="{x:Static prop:Resources.HLS}" ToolTip="{x:Static prop:Resources.HueLightnessSaturation}" AutomationProperties.HelpText="{x:Static prop:Resources.HueLightnessSaturation}"/>
					<MenuItem Name="hsbMenuItem" Header="{x:Static prop:Resources.HSB}" ToolTip="{x:Static prop:Resources.HueSaturationBrightness}" AutomationProperties.HelpText="{x:Static prop:Resources.HueSaturationBrightness}"/>
					<MenuItem Name="rgbMenuItem" Header="{x:Static prop:Resources.RGB}" ToolTip="{x:Static prop:Resources.RedGreenBlue}" AutomationProperties.HelpText="{x:Static prop:Resources.RedGreenBlue}"/>
					<MenuItem Name="cmykMenuItem" Header="{x:Static prop:Resources.CMYK}" ToolTip="{x:Static prop:Resources.CyanMagentaYellowBlack}" AutomationProperties.HelpText="{x:Static prop:Resources.CyanMagentaYellowBlack}"/>
				</ContextMenu>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:ColorComponentsEditorControl">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="*"/>
						</Grid.RowDefinitions>
						
						<Grid x:Name="hlsPane" Visibility="Collapsed" Grid.Row="0" Grid.Column="0">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="23"/>
								<ColumnDefinition Width="77"/>
							</Grid.ColumnDefinitions>
							
							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
									ToolTip="{x:Static prop:Resources.Hue}" AutomationProperties.HelpText="{x:Static prop:Resources.Hue}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.HueInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="hueEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"
								AutomationProperties.HelpText="{x:Static prop:Resources.Hue}" ToolTip="{x:Static prop:Resources.Hue}"
								Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Hue, Mode=TwoWay, Converter={local:DoubleToDegreesConverter}}">
								<local:ColorComponentBox.GradientBrush>
									<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
										<GradientStop Color="Red" Offset="0"/>
										<GradientStop Color="Yellow" Offset="0.167"/>
										<GradientStop Color="Lime" Offset="0.333"/>
										<GradientStop Color="Cyan" Offset="0.500"/>
										<GradientStop Color="Blue" Offset="0.667"/>
										<GradientStop Color="Magenta" Offset="0.833"/>
										<GradientStop Color="Red" Offset="1"/>
									</LinearGradientBrush>
								</local:ColorComponentBox.GradientBrush>
							</local:ColorComponentBox>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
									ToolTip="{x:Static prop:Resources.Lightness}" AutomationProperties.HelpText="{x:Static prop:Resources.Lightness}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.LightnessInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="lightnessEntry"
								AutomationProperties.HelpText="{x:Static prop:Resources.Lightness}" ToolTip="{x:Static prop:Resources.Lightness}"
								HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1"
								Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Lightness, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToLightnessBrushConverter}}"/>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="2" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Saturation}" ToolTip="{x:Static prop:Resources.Saturation}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.SaturationInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="saturationEntryHLS" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Saturation}" ToolTip="{x:Static prop:Resources.Saturation}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Saturation, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToSaturationBrushConverter}}"/>

							<Label Content="{x:Static prop:Resources.AlphaInitial}" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3"
								AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"/>
							<local:ColorComponentBox x:Name="alphaEntryHLS" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=A, Converter={local:ByteToPercentageConverter}, Mode=TwoWay}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToAlphaBrushConverter}}"/>
						</Grid>
						
						<Grid x:Name="hsbPane" Visibility="Collapsed" Grid.Row="0" Grid.Column="0">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="23"/>
								<ColumnDefinition Width="77"/>
							</Grid.ColumnDefinitions>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Hue}" ToolTip="{x:Static prop:Resources.Hue}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.HueInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="hsbHueEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Hue}" ToolTip="{x:Static prop:Resources.Hue}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Hue, Mode=TwoWay, Converter={local:DoubleToDegreesConverter}}">
								<local:ColorComponentBox.GradientBrush>
									<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
										<GradientStop Color="Red" Offset="0"/>
										<GradientStop Color="Yellow" Offset="0.167"/>
										<GradientStop Color="Lime" Offset="0.333"/>
										<GradientStop Color="Cyan" Offset="0.500"/>
										<GradientStop Color="Blue" Offset="0.667"/>
										<GradientStop Color="Magenta" Offset="0.833"/>
										<GradientStop Color="Red" Offset="1"/>
									</LinearGradientBrush>
								</local:ColorComponentBox.GradientBrush>
							</local:ColorComponentBox>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Saturation}" ToolTip="{x:Static prop:Resources.Saturation}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.SaturationInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="saturationEntryHSB" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Saturation}" ToolTip="{x:Static prop:Resources.Saturation}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Saturation, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToSaturationBrushConverter}}"/>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="2" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Brightness}" ToolTip="{x:Static prop:Resources.Brightness}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.BrightnessInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="brightnessEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Brightness}" ToolTip="{x:Static prop:Resources.Brightness}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Brightness, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToBrightnessBrushConverter}}"/>

							<Label Content="{x:Static prop:Resources.AlphaInitial}" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3"
								AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"/>
							<local:ColorComponentBox x:Name="alphaEntryHSB" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=A, Converter={local:ByteToPercentageConverter}, Mode=TwoWay}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToAlphaBrushConverter}}"/>
						</Grid>
						
						<Grid x:Name="rgbPane" Grid.Row="0" Grid.Column="0">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="23"/>
								<ColumnDefinition Width="77"/>
							</Grid.ColumnDefinitions>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Red}" ToolTip="{x:Static prop:Resources.Red}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.RedInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="redEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Red}" ToolTip="{x:Static prop:Resources.Red}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=R, Mode=TwoWay}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToRedBrushConverter}}"/>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Green}" ToolTip="{x:Static prop:Resources.Green}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.GreenInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="greenEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Green}" ToolTip="{x:Static prop:Resources.Green}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=G, Mode=TwoWay}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToGreenBrushConverter}}"/>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="2" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Blue}" ToolTip="{x:Static prop:Resources.Blue}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.BlueInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="blueEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Blue}" ToolTip="{x:Static prop:Resources.Blue}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=B, Mode=TwoWay}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToBlueBrushConverter}}"/>

							<Label Content="{x:Static prop:Resources.AlphaInitial}" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3"
								AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"/>
							<local:ColorComponentBox x:Name="alphaEntryRGB" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=A, Converter={local:ByteToPercentageConverter}, Mode=TwoWay}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToAlphaBrushConverter}}"/>
						</Grid>
						
						<Grid x:Name="cmykPane" Visibility="Collapsed" Grid.Row="0" Grid.Column="0">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
								<RowDefinition Height="Auto" MinHeight="22"/>
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="23"/>
								<ColumnDefinition Width="77"/>
							</Grid.ColumnDefinitions>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Cyan}" ToolTip="{x:Static prop:Resources.Cyan}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.CyanInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="cyanEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Cyan}" ToolTip="{x:Static prop:Resources.Cyan}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=C, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToCyanBrushConverter}}"/>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Magenta}" ToolTip="{x:Static prop:Resources.Magenta}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.MagentaInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="magentaEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Magenta}" ToolTip="{x:Static prop:Resources.Magenta}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=M, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToMagentaBrushConverter}}"/>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="2" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Yellow}" ToolTip="{x:Static prop:Resources.Yellow}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.YellowInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="yellowEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Yellow}" ToolTip="{x:Static prop:Resources.Yellow}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Y, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToYellowBrushConverter}}"/>

							<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="3" Opacity="0" FocusVisualStyle="{x:Null}" Panel.ZIndex="1" IsTabStop="False"
								AutomationProperties.HelpText="{x:Static prop:Resources.Black}" ToolTip="{x:Static prop:Resources.Black}"/>
							<Label HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3" Margin="3,0,0,0">
								<TextBlock TextDecorations="Underline" Text="{x:Static prop:Resources.BlackInitial}"/>
							</Label>
							<local:ColorComponentBox x:Name="blackEntry" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Black}" ToolTip="{x:Static prop:Resources.Black}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=K, Mode=TwoWay, Converter={local:DoubleToPercentageConverter}}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToBlackBrushConverter}}"/>

							<Label Content="{x:Static prop:Resources.AlphaInitial}" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="0" Grid.Row="4"
								AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"/>
							<local:ColorComponentBox x:Name="alphaEntryCMYK" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Column="1" Grid.Row="4"
								 AutomationProperties.HelpText="{x:Static prop:Resources.Alpha}" ToolTip="{x:Static prop:Resources.Alpha}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=A, Converter={local:ByteToPercentageConverter}, Mode=TwoWay}"
								 GradientBrush="{TemplateBinding Color, Converter={local:ColorComponentToAlphaBrushConverter}}"/>
						</Grid>
						
						<TextBox Name="hexEntry" Margin="2,0,2,0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Column="0" Grid.Row="2"
								 AutomationProperties.HelpText="{x:Static prop:Resources.HexValue}" ToolTip="{x:Static prop:Resources.HexValue}"
								 Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={local:HexColorConverter}, Mode=TwoWay}"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:ColorComponentBox" BasedOn="{StaticResource {x:Type TextBox}}">
		<Setter Property="Background" Value="{DynamicResource InputBackgroundBrush}" />
		<Setter Property="BorderBrush" Value="{DynamicResource InputBorderBrush}" />
		<Setter Property="Foreground" Value="{DynamicResource InputForegroundBrush}" />
		<Setter Property="KeyboardNavigation.TabNavigation" Value="Continue"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:ColorComponentBox">
					<Grid>
						<TextBox AcceptsReturn="{TemplateBinding AcceptsReturn}" AcceptsTab="{TemplateBinding AcceptsTab}" AllowDrop="{TemplateBinding AllowDrop}"
								 AutoWordSelection="{TemplateBinding AutoWordSelection}" Background="{TemplateBinding Background}" BitmapEffect="{TemplateBinding BitmapEffect}"
								 BitmapEffectInput="{TemplateBinding BitmapEffectInput}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
								 CacheMode="{TemplateBinding CacheMode}" CaretBrush="{TemplateBinding CaretBrush}" CharacterCasing="{TemplateBinding CharacterCasing}"
								 Clip="{TemplateBinding Clip}" ClipToBounds="{TemplateBinding ClipToBounds}" ContextMenu="{TemplateBinding ContextMenu}"
								 Cursor="{TemplateBinding Cursor}" DataContext="{TemplateBinding DataContext}" FlowDirection="{TemplateBinding FlowDirection}"
								 Focusable="True" FocusVisualStyle="{TemplateBinding FocusVisualStyle}" FontFamily="{TemplateBinding FontFamily}"
								 FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}"
								 FontWeight="{TemplateBinding FontWeight}" ForceCursor="{TemplateBinding ForceCursor}" Foreground="{TemplateBinding Foreground}"
								 Height="{TemplateBinding Height}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
								 HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" IsHitTestVisible="{TemplateBinding IsHitTestVisible}"
								 IsEnabled="{TemplateBinding IsEnabled}" IsInactiveSelectionHighlightEnabled="{TemplateBinding IsInactiveSelectionHighlightEnabled}"
								 IsManipulationEnabled="{TemplateBinding IsManipulationEnabled}" IsReadOnly="{TemplateBinding IsReadOnly}" IsReadOnlyCaretVisible="{TemplateBinding IsReadOnlyCaretVisible}"
								 IsTabStop="True" IsUndoEnabled="{TemplateBinding IsUndoEnabled}" Margin="{TemplateBinding Margin}"
								 MaxHeight="{TemplateBinding MaxHeight}" MaxLength="{TemplateBinding MaxLength}" MaxLines="{TemplateBinding MaxLines}"
								 MaxWidth="{TemplateBinding MaxWidth}" MinHeight="{TemplateBinding MinHeight}" MinLines="{TemplateBinding MinLines}"
								 MinWidth="{TemplateBinding MinWidth}" Padding="{TemplateBinding Padding}" SelectionOpacity="{TemplateBinding SelectionOpacity}"
								 SelectionBrush="{TemplateBinding SelectionBrush}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" TextDecorations="{TemplateBinding TextDecorations}"
								 TextWrapping="{TemplateBinding TextWrapping}" ToolTip="{TemplateBinding ToolTip}" TabIndex="{TemplateBinding TabIndex}"
								 Tag="{TemplateBinding Tag}" TextAlignment="{TemplateBinding TextAlignment}" UndoLimit="{TemplateBinding UndoLimit}"
								 UseLayoutRounding="{TemplateBinding UseLayoutRounding}" Uid="{TemplateBinding Uid}"
								 Text="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
								 Grid.Row="0" Grid.Column="0" Panel.ZIndex="0"/>
						<local:BrushBoxControl Brush="{Binding Path=GradientBrush, RelativeSource={RelativeSource TemplatedParent}}"
											   Height="3" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Grid.Row="0" Grid.Column="0" Panel.ZIndex="1"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:CurrentColorEditorControl">
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:CurrentColorEditorControl">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*"/>
							<ColumnDefinition Width="*"/>
							<ColumnDefinition Width="20"/>
						</Grid.ColumnDefinitions>
						<local:BrushBoxControl HorizontalAlignment="Stretch" Grid.Column="0" Panel.ZIndex="0" IsTabStop="False">
							<local:BrushBoxControl.Brush>
								<SolidColorBrush Color="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InitialColor, Converter={local:CommonColorToColorConverter}}"/>
							</local:BrushBoxControl.Brush>
						</local:BrushBoxControl>
						<Button x:Name="initialColorButton" HorizontalAlignment="Stretch" Grid.Column="0" Panel.ZIndex="1" Opacity="0" FocusVisualStyle="{x:Null}"
								AutomationProperties.HelpText="{x:Static prop:Resources.InitialColor}" ToolTip="{x:Static prop:Resources.InitialColor}" IsTabStop="False"/>
						<local:BrushBoxControl HorizontalAlignment="Stretch" Grid.Column="1" IsTabStop="False"
											   AutomationProperties.HelpText="{x:Static prop:Resources.CurrentColor}" ToolTip="{x:Static prop:Resources.CurrentColor}">
							<local:BrushBoxControl.Brush>
								<SolidColorBrush Color="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={local:CommonColorToColorConverter}}"/>
							</local:BrushBoxControl.Brush>
						</local:BrushBoxControl>
						<local:BrushBoxControl HorizontalAlignment="Stretch" Grid.Column="2" Margin="1,0,0,0" IsTabStop="False"
											   AutomationProperties.HelpText="{x:Static prop:Resources.LastColor}" ToolTip="{x:Static prop:Resources.LastColor}">
							<local:BrushBoxControl.Brush>
								<SolidColorBrush Color="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=LastColor, Converter={local:CommonColorToColorConverter}}"/>
							</local:BrushBoxControl.Brush>
						</local:BrushBoxControl>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:BrushBoxControl">
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:BrushBoxControl">
					<Grid>
						<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Panel.ZIndex="0">
							<Rectangle.Fill>
								<DrawingBrush Stretch="None" TileMode="Tile" Viewport="0,0,20,20" ViewportUnits="Absolute">
									<DrawingBrush.Drawing>
										<DrawingGroup>
											<GeometryDrawing Geometry="M0,0 L20,0 20,20, 0,20Z" Brush="{DynamicResource BrushBoxCheckerBoardLight}"/>
											<GeometryDrawing Geometry="M0,10 L20,10 20,20, 10,20 10,0 0,0Z" Brush="{DynamicResource BrushBoxCheckerBoardDark}"/>
										</DrawingGroup>
									</DrawingBrush.Drawing>
								</DrawingBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Brush}" Panel.ZIndex="1"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="local:PropertyPresenter">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:PropertyPresenter">
					<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition MinWidth="100" MaxWidth="180" Width="0.4*" />
								<ColumnDefinition MinWidth="134" Width="0.6*" />
								<ColumnDefinition Width="12" />
							</Grid.ColumnDefinitions>

							<TextBlock Name="Label" Grid.Column="0" Text="{TemplateBinding Label}" ToolTip="{TemplateBinding Label}" Height="16" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" />
							<ContentPresenter Grid.Column="1" Margin="4,2,0,2" IsEnabled="{Binding Property.CanWrite}" />
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="MenuItem">
		<Setter Property="OverridesDefaultStyle" Value="True" />
		<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
		<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
		<Setter Property="Foreground" Value="{DynamicResource ListItemForegroundBrush}" />
		<Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="BorderBrush" Value="Transparent" />
		<Setter Property="Padding" Value="0,2,0,2" />
		<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="MenuItem">
					<Border x:Name="templateRoot" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition MinWidth="17" SharedSizeGroup="MenuItemIconColumnGroup" Width="Auto"/>
								<ColumnDefinition Width="*"/>
								<ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto"/>
								<ColumnDefinition Width="14"/>
							</Grid.ColumnDefinitions>
							<ContentPresenter x:Name="Icon" Grid.Column="0" ContentSource="Icon" Content="{TemplateBinding Icon}" Margin="4,0,6,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
							<Path x:Name="GlyphPanel" Data="M0,2L0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6z" Grid.Column="0" Margin="4,0,6,0" Visibility="Hidden" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" VerticalAlignment="Center" />
							<ContentPresenter x:Name="menuHeaderContainer" Grid.Column="1" ContentSource="Header" Content="{TemplateBinding Header}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
							<TextBlock x:Name="menuGestureText" Grid.Column="2" Margin="5,2,0,2" DockPanel.Dock="Right" 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>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="IsHighlighted" Value="True">
				<Setter Property="Foreground" Value="{DynamicResource ListItemHighlightForegroundBrush}" />
				<Setter Property="BorderBrush" Value="{DynamicResource ListItemHighlightBorderBrush}" />
				<Setter Property="Background" Value="{DynamicResource ListItemHighlightBackgroundBrush}" />
			</Trigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground" Value="{DynamicResource ListItemDisabledForegroundBrush}" />
			</Trigger>
		</Style.Triggers>
	</Style>

	<Style TargetType="{x:Type ContextMenu}">
		<Setter Property="OverridesDefaultStyle" Value="True" />
		<Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamilyKey}}" />
		<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSizeKey}}" />
		<Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeightKey}}" />
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="Background" Value="{DynamicResource MenuPopupBackgroundBrush}" />
		<Setter Property="Grid.IsSharedSizeScope" Value="true" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="Padding" Value="2" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="BorderBrush" Value="{DynamicResource MenuPopupBorderBrush}" />
		<Setter Property="HasDropShadow" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ContextMenu}">
					<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent">
						<Border x:Name="Border" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
							<ScrollViewer CanContentScroll="True" Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}">
								<ItemsPresenter Margin="{TemplateBinding Padding}" KeyboardNavigation.DirectionalNavigation="Cycle" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
							</ScrollViewer>
						</Border>
					</theme:SystemDropShadowChrome>
					
					<ControlTemplate.Triggers>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding HasDropShadow,RelativeSource={RelativeSource Self}}" Value="True" />
								<Condition Binding="{Binding AreGradientsAllowed,Source={x:Static local:HostEnvironment.Current}}" Value="True" />
							</MultiDataTrigger.Conditions>
							
							<Setter TargetName="shadow" Property="Margin" Value="0,0,5,5" />
							<Setter TargetName="shadow" Property="Color" Value="{DynamicResource DropShadowBackgroundColor}" />
						</MultiDataTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="ArrangeMenuItem" TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
		<Setter Property="Header" Value="{Binding ArrangeMode,Mode=OneTime}" />
		<Setter Property="IsCheckable" Value="True" />
		<Setter Property="IsChecked" Value="{Binding IsChecked,Mode=TwoWay}" />
	</Style>

	<Style TargetType="TextBox">
		<Setter Property="Background" Value="{DynamicResource InputBackgroundBrush}" />
		<Setter Property="BorderBrush" Value="{DynamicResource InputBorderBrush}" />
		<Setter Property="Foreground" Value="{DynamicResource InputForegroundBrush}" />
	</Style>

	<Style TargetType="local:SubmitTextBox" BasedOn="{StaticResource {x:Type TextBox}}">
		<Setter Property="Background" Value="{DynamicResource InputBackgroundBrush}" />
		<Setter Property="BorderBrush" Value="{DynamicResource InputBorderBrush}" />
		<Setter Property="Foreground" Value="{DynamicResource InputForegroundBrush}" />
	</Style>

	<Style x:Key="FocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ScrollBarThumbVertical" TargetType="{x:Type Thumb}">
		<Setter Property="OverridesDefaultStyle" Value="true"/>
		<Setter Property="IsTabStop" Value="false"/>
		<Setter Property="BorderBrush" Value="{DynamicResource VS.Environment.ScrollBarBackgroundBrush}" />
		<Setter Property="BorderThickness" Value="4,0,4,0" />
		<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarThumbBackgroundBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Thumb}">
					<Border x:Name="rectangle" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarThumbMouseOverBackgroundBrush}" />
			</Trigger>
			<Trigger Property="IsDragging" Value="True">
				<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarThumbPressedBackgroundBrush}" />
			</Trigger>
		</Style.Triggers>
	</Style>
	<Style x:Key="ScrollBarThumbHorizontal" TargetType="{x:Type Thumb}">
		<Setter Property="OverridesDefaultStyle" Value="true"/>
		<Setter Property="IsTabStop" Value="false"/>
		<Setter Property="BorderBrush" Value="{DynamicResource VS.Environment.ScrollBarBackgroundBrush}" />
		<Setter Property="BorderThickness" Value="0,4,0,4" />
		<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarThumbBackgroundBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Thumb}">
					<Border x:Name="rectangle" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarThumbMouseOverBackgroundBrush}" />
			</Trigger>
			<Trigger Property="IsDragging" Value="True">
				<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarThumbPressedBackgroundBrush}" />
			</Trigger>
		</Style.Triggers>
	</Style>
	
	<Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="Focusable" Value="false"/>
		<Setter Property="IsTabStop" Value="false"/>
		<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarBackgroundBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<Border x:Name="border" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
						<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="ScrollBar" BasedOn="{StaticResource {x:Type ScrollBar}}">
		<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
		<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
		<Setter Property="Background" Value="{DynamicResource VS.Environment.ScrollBarBackgroundBrush}" />
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
		<Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ScrollBar}">
					<Grid x:Name="Bg" SnapsToDevicePixels="true">
						<Grid.RowDefinitions>
							<RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
							<RowDefinition Height="0.00001*"/>
							<RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
						</Grid.RowDefinitions>
						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Row="1"/>
						<RepeatButton x:Name="PART_LineUpButton" Grid.Row="0" Command="{x:Static ScrollBar.LineUpCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Style="{StaticResource ScrollBarButton}" Background="{DynamicResource VS.Environment.ScrollBarArrowBackgroundBrush}">
							<Path x:Name="ArrowTop" Data="M0,5L9,5 9,4 8,4 8,3 7,3 7,2 6,2 6,1 5,1 5,0 4,0 4,1 3,1 3,2 2,2 2,3 1,3 1,4 0,4z" Fill="{DynamicResource VS.Environment.ScrollBarArrowGlyphBrush}" Margin="0" Stretch="None"/>
						</RepeatButton>
						<Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
							<Track.DecreaseRepeatButton>
								<RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource ScrollBarButton}" Background="{DynamicResource VS.Environment.ScrollBarArrowBackgroundBrush}" />
							</Track.DecreaseRepeatButton>
							<Track.IncreaseRepeatButton>
								<RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource ScrollBarButton}" Background="{DynamicResource VS.Environment.ScrollBarArrowBackgroundBrush}" />
							</Track.IncreaseRepeatButton>
							<Track.Thumb>
								<Thumb Style="{StaticResource ScrollBarThumbVertical}"/>
							</Track.Thumb>
						</Track>
						<RepeatButton x:Name="PART_LineDownButton" Command="{x:Static ScrollBar.LineDownCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="2" Style="{StaticResource ScrollBarButton}" Background="{DynamicResource VS.Environment.ScrollBarBackgroundBrush}">
							<Path x:Name="ArrowBottom" Data="M0,0L9,0 9,1 8,1 8,2 8,2 7,2 7,3 6,3 6,4 5,4 5,5 4,5 4,4 3,4 3,3 2,3 2,2 1,2 1,1 0,1z" Fill="{DynamicResource VS.Environment.ScrollBarArrowGlyphBrush}" Margin="0" Stretch="None"/>
						</RepeatButton>
					</Grid>
					<ControlTemplate.Triggers>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineDownButton}" Value="true"/>
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineDownButton}" Value="true"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowBottom" Value="{DynamicResource VS.Environment.ScrollBarThumbPressedBackgroundBrush}"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineUpButton}" Value="true"/>
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineUpButton}" Value="true"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowTop" Value="{DynamicResource VS.Environment.ScrollBarThumbPressedBackgroundBrush}"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineDownButton}" Value="true"/>
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineDownButton}" Value="false"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowBottom" Value="{DynamicResource VS.Environment.ScrollBarArrowGlyphMouseOverBrush}"/>
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineUpButton}" Value="true"/>
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineUpButton}" Value="false"/>
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowTop" Value="{DynamicResource VS.Environment.ScrollBarArrowGlyphMouseOverBrush}"/>
						</MultiDataTrigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Fill" TargetName="ArrowTop" Value="{DynamicResource VS.Environment.ScrollBarArrowDisabledBackgroundBrush}"/>
							<Setter Property="Fill" TargetName="ArrowBottom" Value="{DynamicResource VS.Environment.ScrollBarArrowDisabledBackgroundBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Style.Triggers>
			<Trigger Property="Orientation" Value="Horizontal">
				<Setter Property="Width" Value="Auto"/>
				<Setter Property="MinWidth" Value="0"/>
				<Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
				<Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
				<Setter Property="BorderThickness" Value="0,1"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ScrollBar}">
							<Grid x:Name="Bg" SnapsToDevicePixels="true">
								<Grid.ColumnDefinitions>
									<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
									<ColumnDefinition Width="0.00001*"/>
									<ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
								</Grid.ColumnDefinitions>
								<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1"/>
								<RepeatButton x:Name="PART_LineLeftButton" Grid.Column="0" Command="{x:Static ScrollBar.LineLeftCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Style="{StaticResource ScrollBarButton}">
									<Path x:Name="ArrowLeft" Data="M 3.18,7 C3.18,7 5,7 5,7 5,7 1.81,3.5 1.81,3.5 1.81,3.5 5,0 5,0 5,0 3.18,0 3.18,0 3.18,0 0,3.5 0,3.5 0,3.5 3.18,7 3.18,7 z" Fill="{DynamicResource VS.Environment.ScrollBarArrowGlyphBrush}" Margin="3" Stretch="Uniform"/>
								</RepeatButton>
								<Track x:Name="PART_Track" Grid.Column="1" IsEnabled="{TemplateBinding IsMouseOver}">
									<Track.DecreaseRepeatButton>
										<RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource RepeatButtonTransparent}"/>
									</Track.DecreaseRepeatButton>
									<Track.IncreaseRepeatButton>
										<RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource RepeatButtonTransparent}"/>
									</Track.IncreaseRepeatButton>
									<Track.Thumb>
										<Thumb Style="{StaticResource ScrollBarThumbHorizontal}"/>
									</Track.Thumb>
								</Track>
								<RepeatButton x:Name="PART_LineRightButton" Grid.Column="2" Command="{x:Static ScrollBar.LineRightCommand}" IsEnabled="{TemplateBinding IsMouseOver}" Style="{StaticResource ScrollBarButton}">
									<Path x:Name="ArrowRight" Data="M 1.81,7 C1.81,7 0,7 0,7 0,7 3.18,3.5 3.18,3.5 3.18,3.5 0,0 0,0 0,0 1.81,0 1.81,0 1.81,0 5,3.5 5,3.5 5,3.5 1.81,7 1.81,7 z" Fill="{DynamicResource VS.Environment.ScrollBarArrowGlyphBrush}" Margin="3" Stretch="Uniform"/>
								</RepeatButton>
							</Grid>
							<ControlTemplate.Triggers>
								<MultiDataTrigger>
									<MultiDataTrigger.Conditions>
										<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineRightButton}" Value="true"/>
										<Condition Binding="{Binding IsPressed, ElementName=PART_LineRightButton}" Value="true"/>
									</MultiDataTrigger.Conditions>
									<Setter Property="Fill" TargetName="ArrowRight" Value="{DynamicResource VS.Environment.ScrollBarThumbPressedBackgroundBrush}"/>
								</MultiDataTrigger>
								<MultiDataTrigger>
									<MultiDataTrigger.Conditions>
										<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineLeftButton}" Value="true"/>
										<Condition Binding="{Binding IsPressed, ElementName=PART_LineLeftButton}" Value="true"/>
									</MultiDataTrigger.Conditions>
									<Setter Property="Fill" TargetName="ArrowLeft" Value="{DynamicResource VS.Environment.ScrollBarThumbPressedBackgroundBrush}"/>
								</MultiDataTrigger>
								<MultiDataTrigger>
									<MultiDataTrigger.Conditions>
										<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineRightButton}" Value="true"/>
										<Condition Binding="{Binding IsPressed, ElementName=PART_LineRightButton}" Value="false"/>
									</MultiDataTrigger.Conditions>
									<Setter Property="Fill" TargetName="ArrowRight" Value="{DynamicResource VS.Environment.ScrollBarArrowGlyphMouseOverBrush}"/>
								</MultiDataTrigger>
								<MultiDataTrigger>
									<MultiDataTrigger.Conditions>
										<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineLeftButton}" Value="true"/>
										<Condition Binding="{Binding IsPressed, ElementName=PART_LineLeftButton}" Value="false"/>
									</MultiDataTrigger.Conditions>
									<Setter Property="Fill" TargetName="ArrowLeft" Value="{DynamicResource VS.Environment.ScrollBarArrowGlyphMouseOverBrush}"/>
								</MultiDataTrigger>
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Fill" TargetName="ArrowLeft" Value="Transparent"/>
									<Setter Property="Fill" TargetName="ArrowRight" Value="Transparent"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Trigger>
		</Style.Triggers>
	</Style>

	<Style x:Key="GenericVisualFocusStyle" TargetType="Control">
		<Setter Property="Foreground" Value="{DynamicResource FocusVisualBorderBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="EmptyCheckBoxFocusVisualSquare" TargetType="Control" BasedOn="{StaticResource GenericVisualFocusStyle}">
		<Setter Property="Margin" Value="-3,0,0,0" />
		<Setter Property="Width" Value="22" />
		<Setter Property="Height" Value="21" />
		<Setter Property="HorizontalAlignment" Value="Left" />
		<Setter Property="VerticalAlignment" Value="Center" />
	</Style>

	<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisualSquare}" />
	</Style>
</ResourceDictionary>