-
Notifications
You must be signed in to change notification settings - Fork 748
Expand file tree
/
Copy pathResources.xaml
More file actions
721 lines (688 loc) · 37.3 KB
/
Resources.xaml
File metadata and controls
721 lines (688 loc) · 37.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
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
<ResourceDictionary
x:Class="NuGet.PackageManagement.UI.SharedResources"
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:nuget="clr-namespace:NuGet.PackageManagement.UI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Utilities"
xmlns:vs="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:vsui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0">
<nuget:StyleKeyConverter
x:Key="StyleKeyConverter" />
<nuget:NuGetFrameworkToStringConverter
x:Key="NuGetFrameworkToStringConverter" />
<nuget:NuGetFrameworkToVisibilityConverter
x:Key="NuGetFrameworkToVisibilityConverter" />
<nuget:NullToVisibilityConverter
x:Key="NullToVisibilityConverter" />
<nuget:InverseNullToVisibilityConverter
x:Key="InverseNullToVisibilityConverter" />
<nuget:EnumerableToVisibilityConverter
Inverted="true"
x:Key="EmptyEnumerableToVisibilityConverter" />
<nuget:EnumerableToVisibilityConverter
x:Key="EnumerableToVisibilityConverter" />
<nuget:LastItemToVisibilityConverter
x:Key="LastItemToVisibilityConverter" />
<nuget:InverseBooleanConverter
x:Key="InverseBooleanConverter" />
<nuget:BooleanToGridRowHeightConverter
x:Key="BooleanToGridRowHeightConverter"/>
<nuget:BooleanToGridRowHeightConverter
Inverted="True"
x:Key="InvertedBooleanToGridRowHeightConverter"/>
<BooleanToVisibilityConverter
x:Key="BooleanToVisibilityConverter" />
<vsui:BooleanToCustomVisibilityConverter
x:Key="NegatedBooleanToVisibilityConverter"
VisibilityIfTrue="Collapsed"
VisibilityIfFalse="Visible" />
<vsui:BooleanToHiddenVisibilityConverter
x:Key="BooleanToHiddenVisibilityConverter" />
<nuget:DownloadCountToVisibilityConverter
x:Key="DownloadCountToVisibilityConverter" />
<nuget:FontSizeConverter
Scale="122"
x:Key="Font122PercentSizeConverter" />
<nuget:FontSizeConverter
Scale="155"
x:Key="Font155PercentSizeConverter" />
<nuget:VersionToStringConverter
x:Key="VersionToStringConverter" />
<nuget:ProjectAndSolutionViewHeightConverter
x:Key="ProjectAndSolutionViewHeightConverter" />
<nuget:ProjectAndSolutionViewMinHeightConverter
x:Key="ProjectAndSolutionViewMinHeightConverter"/>
<nuget:RadioBoolToIntConverter
x:Key="RadioBoolToIntConverter" />
<nuget:SubstractionConverter
x:Key="SubstractionConverter" />
<nuget:AdditionConverter
x:Key="AdditionConverter" />
<nuget:IntToVulnerabilitySeverityConverter
x:Key="IntToVulnerabilitySeverityConverter" />
<ui:BrushToColorConverter
x:Key="BrushToColorConverter" />
<!-- Default styles -->
<Style x:Key="ControlsFocusVisualStyle" TargetType="{x:Type Control}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Rectangle x:Name="ControlFocusVisualRectangle"
Stroke="{TemplateBinding Foreground}"
StrokeThickness="1"
StrokeDashArray="1 2"
SnapsToDevicePixels="true"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="GridSplitterFocusVisualStyle" TargetType="{x:Type Control}">
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.GridSplitterFocusBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Rectangle x:Name="GridSplitterFocusVisualRectangle"
Fill="{TemplateBinding Background}"
Stroke="{TemplateBinding Foreground}"
StrokeThickness="1"
StrokeDashArray="1 2"
SnapsToDevicePixels="true"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MarginFocusVisualStyle" TargetType="{x:Type Control}" BasedOn="{StaticResource ControlsFocusVisualStyle}">
<Setter Property="Margin" Value="4"/>
</Style>
<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource MarginFocusVisualStyle}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ButtonTextStyleBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static nuget:Brushes.ButtonBorderBrushKey}}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.ButtonBackgroundStyleBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="10,1,10,1"/>
<Setter Property="MinHeight" Value="23"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border
x:Name="border"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
RecognizesAccessKey="True"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.ButtonDefaultStyleBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ButtonDefaultTextStyleBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static nuget:Brushes.ButtonDefaultBorderStyleBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.ButtonHoverStyleBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static nuget:Brushes.ButtonHoverBorderStyleBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ButtonHoverTextStyleBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.ButtonPressedStyleBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static nuget:Brushes.ButtonPressedBorderStyleBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ButtonPressedTextStyleBrushKey}}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource {x:Static nuget:Brushes.ButtonDisabledStyleBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ButtonDisabledTextStyleBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static nuget:Brushes.ButtonDisabledBorderStyleBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
</Style>
<Style x:Key="{x:Type TextBlock}" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
</Style>
<Style x:Key="{x:Type GridSplitter}" TargetType="{x:Type GridSplitter}" BasedOn="{StaticResource {x:Type GridSplitter}}">
<Setter Property="FocusVisualStyle" Value="{StaticResource GridSplitterFocusVisualStyle}"/>
</Style>
<Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ComboBoxStyleKey}}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
</Style>
<Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ComboBoxItemStyleKey}}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
</Style>
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ScrollBarStyleKey}}"/>
<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ScrollViewerStyleKey}}"/>
<Style x:Key="TooltipStyle" TargetType="{x:Type TextBlock}">
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="MaxWidth" Value="300" />
</Style>
<Style x:Key="ToolBarButtonStyle" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}" />
</Style>
<Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.CheckBoxStyleKey}}" />
<Style x:Key="CheckBoxSelectorAware" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
<Setter Property="FocusVisualStyle" Value="{DynamicResource ControlsFocusVisualStyle}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Grid x:Name="TemplateRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid SnapsToDevicePixels="true" Width="16" Height="16" HorizontalAlignment="Left" VerticalAlignment="Top">
<Border
x:Name="CheckMarkBorder"
Background="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundBrushKey}}"
BorderThickness="1">
<Border.Style>
<Style TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderBrushKey}}" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
<Path
x:Name="CheckMark"
Data="M 6.22,11.02 C6.22,11.02 2.50,7.24 2.50,7.24 2.50,7.24 4.05,5.71 4.05,5.71 4.05,5.71 5.97,7.65 5.97,7.65 5.97,7.65 10.52,1.38 10.52,1.38 10.52,1.38 13.19,1.38 13.19,1.38 13.19,1.38 6.22,11.02 6.22,11.02 6.22,11.02 6.22,11.02 6.22,11.02 z"
Stretch="Uniform" Margin="3,1,2,2" Visibility="Collapsed" Width="9" Height="8"
Fill="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphBrushKey}}"/>
</Grid>
<ContentPresenter
x:Name="CheckBoxContent"
Grid.Column="1"
Focusable="False"
Margin="{TemplateBinding Padding}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasContent" Value="true">
<Setter Property="Padding" Value="6,1,0,0"/>
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Visibility" TargetName="CheckMark" Value="Visible"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="CheckMarkBorder" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundDisabledBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="CheckMarkBorder" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderDisabledBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxTextDisabledBrushKey}}"/>
<Setter Property="Fill" TargetName="CheckMark" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphDisabledBrushKey}}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="CheckMarkBorder" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundHoverBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="CheckMarkBorder" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderHoverBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxTextHoverBrushKey}}"/>
<Setter Property="Fill" TargetName="CheckMark" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphHoverBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="CheckMarkBorder" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundPressedBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="CheckMarkBorder" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderPressedBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxTextPressedBrushKey}}"/>
<Setter Property="Fill" TargetName="CheckMark" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphPressedBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ThemedDialogRadioButtonStyleKey}}" />
<Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.RowDefinitions>
<RowDefinition Height="19"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="-90"/>
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse
x:Name="circle"
Fill="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundBrushKey}}"
HorizontalAlignment="Center"
Height="19"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderBrushKey}}"
VerticalAlignment="Center"
Width="19"/>
<Path
x:Name="arrow"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
HorizontalAlignment="Center"
SnapsToDevicePixels="false"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphBrushKey}}"
StrokeThickness="2"
VerticalAlignment="Center"/>
</Grid>
<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" Grid.Row="1" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Top"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderHoverBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundHoverBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphHoverBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderPressedBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundPressedBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphPressedBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="19"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="180"/>
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse
x:Name="circle"
Fill="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundBrushKey}}"
HorizontalAlignment="Center"
Height="19"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderBrushKey}}"
VerticalAlignment="Center"
Width="19"/>
<Path
x:Name="arrow"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
HorizontalAlignment="Center"
SnapsToDevicePixels="false"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphBrushKey}}"
StrokeThickness="2"
VerticalAlignment="Center"/>
</Grid>
<ContentPresenter Grid.Column="1" HorizontalAlignment="Left" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderHoverBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundHoverBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphHoverBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderPressedBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundPressedBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphPressedBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.RowDefinitions>
<RowDefinition Height="19"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="90"/>
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse
x:Name="circle"
Fill="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundBrushKey}}"
HorizontalAlignment="Center"
Height="19"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderBrushKey}}"
VerticalAlignment="Center"
Width="19"/>
<Path
x:Name="arrow"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
HorizontalAlignment="Center"
SnapsToDevicePixels="false"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphBrushKey}}"
StrokeThickness="2"
VerticalAlignment="Center"/>
</Grid>
<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" Grid.Row="1" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Top"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderHoverBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundHoverBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphHoverBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderPressedBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundPressedBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphPressedBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="19"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Ellipse
x:Name="circle"
Fill="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundBrushKey}}"
HorizontalAlignment="Center"
Height="19"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderBrushKey}}"
VerticalAlignment="Center"
Width="19"/>
<Path
x:Name="arrow"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
HorizontalAlignment="Center"
SnapsToDevicePixels="false"
Stroke="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphBrushKey}}"
StrokeThickness="2"
VerticalAlignment="Center"/>
<ContentPresenter Grid.Column="1" HorizontalAlignment="Left" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderHoverBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundHoverBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphHoverBrushKey}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
<Setter Property="Stroke" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBorderPressedBrushKey}}"/>
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxBackgroundPressedBrushKey}}"/>
<Setter Property="Stroke" TargetName="arrow" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxGlyphPressedBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type Expander}" TargetType="{x:Type Expander}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3" SnapsToDevicePixels="true">
<DockPanel>
<ToggleButton
x:Name="HeaderSite"
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
Content="{TemplateBinding Header}"
DockPanel.Dock="Top"
Foreground="{TemplateBinding Foreground}"
FontWeight="{TemplateBinding FontWeight}"
FocusVisualStyle="{StaticResource ControlsFocusVisualStyle}"
FontStyle="{TemplateBinding FontStyle}"
FontStretch="{TemplateBinding FontStretch}"
FontSize="{TemplateBinding FontSize}"
FontFamily="{TemplateBinding FontFamily}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Margin="1"
MinWidth="0"
MinHeight="0"
Padding="{TemplateBinding Padding}"
Style="{StaticResource ExpanderDownHeaderStyle}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<ContentPresenter
x:Name="ExpandSite"
DockPanel.Dock="Bottom"
Focusable="false"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"
Visibility="Collapsed"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="true">
<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
</Trigger>
<Trigger Property="ExpandDirection" Value="Right">
<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right"/>
<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}"/>
</Trigger>
<Trigger Property="ExpandDirection" Value="Up">
<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top"/>
<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom"/>
<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}"/>
</Trigger>
<Trigger Property="ExpandDirection" Value="Left">
<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left"/>
<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right"/>
<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.CheckBoxTextDisabledBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- In order to create a TextBlock like element, but with selectable text use:
<TextBox Style="{DynamicResource SelectableTextBlockStyle}" />
Thanks to juanjo.arana for his style, which we tweaked: http://stackoverflow.com/questions/136435/any-way-to-make-a-wpf-textblock-selectable
-->
<Style x:Key="SelectableTextBlockStyle" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}"/>
<Setter Property="Padding" Value="-2,0,-2,0"/>
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="False" />
<Condition Property="IsFocused" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<TextBlock Text="{TemplateBinding Text}"
Foreground="{DynamicResource {x:Static nuget:Brushes.UIText}}"
Background="{TemplateBinding Background}"
FontSize="{TemplateBinding FontSize}"
FontStyle="{TemplateBinding FontStyle}"
FontFamily="{TemplateBinding FontFamily}"
FontWeight="{TemplateBinding FontWeight}"
TextWrapping="{TemplateBinding TextWrapping}"
TextTrimming="CharacterEllipsis"
Padding="0,0,0,0" />
</ControlTemplate>
</Setter.Value>
</Setter>
</MultiTrigger>
</Style.Triggers>
</Style>
<Style
TargetType="{x:Type Hyperlink}"
x:Key="HyperlinkStyleNoUri">
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ControlLinkTextKey}}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
<Style.Triggers>
<Trigger
Property="IsMouseOver"
Value="True">
<Setter
Property="Foreground"
Value="{DynamicResource {x:Static nuget:Brushes.ControlLinkTextHoverKey}}" />
</Trigger>
<Trigger
Property="IsMouseOver"
Value="False">
<Setter
Property="TextBlock.TextDecorations"
Value="{x:Null}" />
</Trigger>
</Style.Triggers>
</Style>
<Style
TargetType="{x:Type Hyperlink}"
x:Key="HyperlinkStyleNoUriDeprecation">
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type TextBlock}}, Path=Foreground}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
<Setter Property="TextBlock.TextDecorations" Value="Underline" />
</Style>
<Style
TargetType="{x:Type Hyperlink}"
x:Key="HyperlinkStyle"
BasedOn="{StaticResource HyperlinkStyleNoUri}">
<Style.Triggers>
<Trigger
Property="NavigateUri"
Value="{x:Null}">
<Setter
Property="Foreground"
Value="{DynamicResource {x:Static nuget:Brushes.WindowTextKey}}" />
<Setter
Property="TextBlock.TextDecorations"
Value="{x:Null}" />
<Setter
Property="IsEnabled"
Value="False" />
</Trigger>
</Style.Triggers>
</Style>
<Style
TargetType="{x:Type Hyperlink}"
x:Key="WindowHyperlinkStyle">
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ControlLinkTextKey}}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
<Style.Triggers>
<Trigger
Property="IsMouseOver"
Value="True">
<Setter
Property="Foreground"
Value="{DynamicResource {x:Static nuget:Brushes.ControlLinkTextHoverKey}}" />
</Trigger>
<Trigger
Property="IsMouseOver"
Value="False">
<Setter
Property="TextBlock.TextDecorations"
Value="{x:Null}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="HyperlinkSelectorAware" TargetType="{x:Type Hyperlink}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ThemedDialogHyperlinkStyleKey}}">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}" Value="True" />
<Condition Binding="{Binding (Selector.IsSelectionActive), RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}" Value="False" />
</MultiDataTrigger.Conditions>
<Setter
Property="Foreground"
Value="{DynamicResource {x:Static nuget:Brushes.ContentInactiveSelectedTextBrushKey}}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}" Value="True" />
<Condition Binding="{Binding (Selector.IsSelectionActive), RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter
Property="Foreground"
Value="{DynamicResource {x:Static nuget:Brushes.ContentSelectedTextBrushKey}}" />
</MultiDataTrigger>
</Style.Triggers>
</Style>
<Style
x:Key="PackageIconImageStyle"
TargetType="{x:Type Image}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Height" Value="32" />
<Setter Property="Width" Value="32" />
<Setter Property="Source" Value="{Binding Path='DataContext.IconBitmap',RelativeSource='{RelativeSource Self}'}" />
</Style>
</ResourceDictionary>