1
1
<ResourceDictionary xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2
- xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml" >
3
-
4
- <SolidColorBrush x : Key =" FlatListViewGridLineBrush" Color =" {DynamicResource VsColor.GridLine}" />
5
- <SolidColorBrush x : Key =" FlatListViewHighlightBackgroundBrush" Color =" {DynamicResource VsColor.Highlight}" />
6
- <SolidColorBrush x : Key =" FlatListViewHighlightForegroundBrush" Color =" White" />
7
- <SolidColorBrush x : Key =" FlatListViewHoverBrush" Color =" {DynamicResource VsColor.InactiveBorder}" />
8
-
9
- <Style x : Key =" FlatListViewItemStyle" TargetType =" ListViewItem" >
2
+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
3
+ xmlns : vsp =" clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0" >
4
+ <Style TargetType =" ListBoxItem" >
5
+ <Setter Property =" SnapsToDevicePixels" Value =" True" />
6
+ <Setter Property =" Padding" Value =" 4,1" />
7
+ <Setter Property =" HorizontalContentAlignment" Value =" {Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
8
+ <Setter Property =" VerticalContentAlignment" Value =" {Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
10
9
<Setter Property =" Template" >
11
10
<Setter .Value>
12
- <ControlTemplate TargetType =" {x:Type ListViewItem}" >
13
- <Border Name =" Border" Background =" Transparent" Padding =" 2" >
14
- <GridViewRowPresenter VerticalAlignment =" {TemplateBinding VerticalContentAlignment}" />
11
+ <ControlTemplate TargetType =" {x:Type ListBoxItem}" >
12
+ <Border x : Name =" border"
13
+ BorderBrush =" {TemplateBinding BorderBrush}"
14
+ BorderThickness =" {TemplateBinding BorderThickness}"
15
+ Background =" {TemplateBinding Background}"
16
+ Padding =" {TemplateBinding Padding}"
17
+ SnapsToDevicePixels =" true" >
18
+ <ContentPresenter HorizontalAlignment =" {TemplateBinding HorizontalContentAlignment}"
19
+ SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}"
20
+ VerticalAlignment =" {TemplateBinding VerticalContentAlignment}" />
15
21
</Border >
16
22
<ControlTemplate .Triggers>
17
23
<Trigger Property =" IsMouseOver" Value =" True" >
18
- <Setter Property =" Background" TargetName =" Border " Value =" {StaticResource FlatListViewHoverBrush }" />
24
+ <Setter Property =" Background" TargetName =" border " Value =" {DynamicResource VsBrush.CommandBarHover }" />
19
25
</Trigger >
20
26
<Trigger Property =" IsSelected" Value =" True" >
21
- <Setter Property =" TextBlock.Foreground " TargetName =" Border " Value =" {StaticResource FlatListViewHighlightForegroundBrush} " />
22
- <Setter Property =" Background " TargetName =" Border " Value =" {StaticResource FlatListViewHighlightBackgroundBrush} " />
27
+ <Setter Property =" Background " TargetName =" border " Value =" {DynamicResource {x:Static vsp:TreeViewColors.SelectedItemActiveBrushKey}} " />
28
+ <Setter Property =" TextElement.Foreground " TargetName =" border " Value =" {DynamicResource {x:Static vsp:TreeViewColors.SelectedItemActiveTextBrushKey}} " />
23
29
</Trigger >
24
- </ControlTemplate .Triggers>
25
- </ControlTemplate >
26
- </Setter .Value>
27
- </Setter >
28
- </Style >
29
-
30
- <Style x : Key =" FlatGridViewColumnHeaderGripper" TargetType =" {x:Type Thumb}" >
31
- <Setter Property =" Canvas.Right" Value =" -9" />
32
- <Setter Property =" Width" Value =" 18" />
33
- <Setter Property =" Height" Value =" {Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}" />
34
- <Setter Property =" Padding" Value =" 0" />
35
- <Setter Property =" Background" Value =" {StaticResource FlatListViewGridLineBrush}" />
36
- <Setter Property =" Template" >
37
- <Setter .Value>
38
- <ControlTemplate TargetType =" {x:Type Thumb}" >
39
- <Border Background =" Transparent" Padding =" {TemplateBinding Padding}" >
40
- <Rectangle Fill =" {TemplateBinding Background}" HorizontalAlignment =" Center" Width =" 1" />
41
- </Border >
42
- </ControlTemplate >
43
- </Setter .Value>
44
- </Setter >
45
- </Style >
46
-
47
- <Style x : Key =" FlatGridViewColumnHeader" TargetType =" GridViewColumnHeader" >
48
- <Setter Property =" Background" Value =" Transparent" />
49
- <Setter Property =" Foreground" Value =" {DynamicResource GitHubVsWindowText}" />
50
- <Setter Property =" HorizontalContentAlignment" Value =" Left" />
51
- <Setter Property =" Template" >
52
- <Setter .Value>
53
- <ControlTemplate TargetType =" {x:Type GridViewColumnHeader}" >
54
- <Grid SnapsToDevicePixels =" True" >
55
- <Border Name =" HeaderBorder"
56
- BorderThickness =" 0,0,0,1"
57
- BorderBrush =" {StaticResource FlatListViewGridLineBrush}"
58
- Background =" Transparent" >
59
- <TextBlock x : Name =" ContentHeader" Margin =" 6,1,0,0" Text =" {TemplateBinding Content}" Width =" {TemplateBinding Width}" TextAlignment =" Left" />
60
- </Border >
61
- <Canvas >
62
- <Thumb Name =" PART_HeaderGripper" Style =" {StaticResource FlatGridViewColumnHeaderGripper}" />
63
- </Canvas >
64
- </Grid >
65
- <ControlTemplate .Triggers>
66
- <Trigger Property =" IsMouseOver" Value =" True" >
67
- <Setter Property =" Background" TargetName =" HeaderBorder" Value =" {StaticResource FlatListViewHoverBrush}" />
30
+ <MultiTrigger >
31
+ <MultiTrigger .Conditions>
32
+ <Condition Property =" IsSelected" Value =" True" />
33
+ <Condition Property =" Selector.IsSelectionActive" Value =" False" />
34
+ </MultiTrigger .Conditions>
35
+ <Setter Property =" Background" TargetName =" border" Value =" {DynamicResource {x:Static vsp:TreeViewColors.SelectedItemInactiveBrushKey}}" />
36
+ <Setter Property =" TextElement.Foreground" TargetName =" border" Value =" {DynamicResource {x:Static vsp:TreeViewColors.SelectedItemInactiveTextBrushKey}}" />
37
+ </MultiTrigger >
38
+ <Trigger Property =" IsEnabled" Value =" False" >
39
+ <Setter Property =" TextElement.Foreground" TargetName =" border" Value =" {DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
68
40
</Trigger >
69
41
</ControlTemplate .Triggers>
70
42
</ControlTemplate >
71
43
</Setter .Value>
72
44
</Setter >
73
- <Style .Triggers>
74
- <Trigger Property =" Role" Value =" Padding" >
75
- <Setter Property =" Template" >
76
- <Setter .Value>
77
- <ControlTemplate TargetType =" {x:Type GridViewColumnHeader}" >
78
- <Border x : Name =" HeaderBorder" BorderBrush =" {TemplateBinding BorderBrush}" BorderThickness =" 0,1,0,1" Background =" {TemplateBinding Background}" />
79
- <ControlTemplate .Triggers>
80
- <Trigger Property =" Height" Value =" Auto" >
81
- <Setter Property =" MinHeight" Value =" 20" />
82
- </Trigger >
83
- </ControlTemplate .Triggers>
84
- </ControlTemplate >
85
- </Setter .Value>
86
- </Setter >
87
- </Trigger >
88
- </Style .Triggers>
89
45
</Style >
90
46
</ResourceDictionary >
0 commit comments