11<ResourceDictionary xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22 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" >
3+ <Style TargetType =" ListBoxItem" >
4+ <Setter Property =" SnapsToDevicePixels" Value =" True" />
5+ <Setter Property =" Padding" Value =" 4,1" />
6+ <Setter Property =" HorizontalContentAlignment" Value =" {Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
7+ <Setter Property =" VerticalContentAlignment" Value =" {Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
108 <Setter Property =" Template" >
119 <Setter .Value>
12- <ControlTemplate TargetType =" {x:Type ListViewItem}" >
13- <Border Name =" Border" Background =" Transparent" Padding =" 2" >
14- <GridViewRowPresenter VerticalAlignment =" {TemplateBinding VerticalContentAlignment}" />
10+ <ControlTemplate TargetType =" {x:Type ListBoxItem}" >
11+ <Border x : Name =" border"
12+ BorderBrush =" {TemplateBinding BorderBrush}"
13+ BorderThickness =" {TemplateBinding BorderThickness}"
14+ Background =" {TemplateBinding Background}"
15+ Padding =" {TemplateBinding Padding}"
16+ SnapsToDevicePixels =" true" >
17+ <ContentPresenter HorizontalAlignment =" {TemplateBinding HorizontalContentAlignment}"
18+ SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}"
19+ VerticalAlignment =" {TemplateBinding VerticalContentAlignment}" />
1520 </Border >
1621 <ControlTemplate .Triggers>
1722 <Trigger Property =" IsMouseOver" Value =" True" >
18- <Setter Property =" Background" TargetName =" Border " Value =" {StaticResource FlatListViewHoverBrush }" />
23+ <Setter Property =" Background" TargetName =" border " Value =" {DynamicResource VsBrush.CommandBarHover }" />
1924 </Trigger >
20- <Trigger Property =" IsSelected" Value =" True" >
21- <Setter Property =" TextBlock.Foreground" TargetName =" Border" Value =" {StaticResource FlatListViewHighlightForegroundBrush}" />
22- <Setter Property =" Background" TargetName =" Border" Value =" {StaticResource FlatListViewHighlightBackgroundBrush}" />
25+ <MultiTrigger >
26+ <MultiTrigger .Conditions>
27+ <Condition Property =" Selector.IsSelectionActive" Value =" True" />
28+ <Condition Property =" IsSelected" Value =" True" />
29+ </MultiTrigger .Conditions>
30+ <Setter Property =" Background" TargetName =" border" Value =" {DynamicResource VsBrush.Highlight}" />
31+ <Setter Property =" TextElement.Foreground" TargetName =" border" Value =" {DynamicResource VsBrush.HighlightText}" />
32+ </MultiTrigger >
33+ <Trigger Property =" IsEnabled" Value =" False" >
34+ <Setter Property =" TextElement.Foreground" TargetName =" border" Value =" {DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
2335 </Trigger >
2436 </ControlTemplate .Triggers>
2537 </ControlTemplate >
2638 </Setter .Value>
2739 </Setter >
2840 </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}" />
68- </Trigger >
69- </ControlTemplate .Triggers>
70- </ControlTemplate >
71- </Setter .Value>
72- </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- </Style >
9041</ResourceDictionary >
0 commit comments