markus / KCOM / Resources / SimpleLIstViewStyle.xaml @ 4fcb686a
이력 | 보기 | 이력해설 | 다운로드 (3.68 KB)
1 |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
---|---|
2 |
<SolidColorBrush x:Key="BlueRinseBrush" Color="#2A579A" /> |
3 |
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb"> |
4 |
<Setter Property="Width" Value="18" /> |
5 |
<Setter Property="Background" Value="#FF6481AC" /> |
6 |
<Setter Property="Template"> |
7 |
<Setter.Value>
|
8 |
<ControlTemplate TargetType="{x:Type Thumb}"> |
9 |
<Border Padding="{TemplateBinding Padding}" Background="Transparent"> |
10 |
<Rectangle
|
11 |
Width="3" |
12 |
HorizontalAlignment="Center" |
13 |
Fill="{TemplateBinding Background}" /> |
14 |
</Border>
|
15 |
</ControlTemplate>
|
16 |
</Setter.Value>
|
17 |
</Setter>
|
18 |
</Style>
|
19 |
<Style x:Key="GridViewColumnHeaderStyle" TargetType="GridViewColumnHeader"> |
20 |
<Setter Property="Background" Value="Red" /> |
21 |
<Setter Property="HorizontalContentAlignment" Value="Center" /> |
22 |
<Setter Property="VerticalContentAlignment" Value="Center" /> |
23 |
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
24 |
<Setter Property="Background" Value="{StaticResource BlueRinseBrush}" /> |
25 |
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> |
26 |
<Setter Property="Template"> |
27 |
<Setter.Value>
|
28 |
<ControlTemplate TargetType="GridViewColumnHeader"> |
29 |
<Grid>
|
30 |
<Grid.ColumnDefinitions>
|
31 |
<ColumnDefinition /> |
32 |
</Grid.ColumnDefinitions>
|
33 |
<Border
|
34 |
Name="HeaderBorder" |
35 |
Padding="2,0,0,0" |
36 |
Background="{StaticResource BlueRinseBrush}" |
37 |
BorderBrush="{StaticResource BlueRinseBrush}" |
38 |
BorderThickness="0"> |
39 |
<ContentPresenter
|
40 |
Name="HeaderContent" |
41 |
Margin="0,0,0,1" |
42 |
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
43 |
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
44 |
RecognizesAccessKey="True" |
45 |
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" |
46 |
TextElement.Foreground="White" /> |
47 |
</Border>
|
48 |
<Thumb
|
49 |
x:Name="PART_HeaderGripper" |
50 |
Margin="0,0,-9,0" |
51 |
HorizontalAlignment="Right" |
52 |
Style="{StaticResource GridViewColumnHeaderGripper}" /> |
53 |
</Grid>
|
54 |
<ControlTemplate.Triggers>
|
55 |
<Trigger Property="IsMouseOver" Value="true"> |
56 |
<Setter TargetName="HeaderBorder" Property="Background" Value="Yellow" /> |
57 |
<Setter TargetName="HeaderContent" Property="TextElement.Foreground" Value="Black" /> |
58 |
</Trigger>
|
59 |
</ControlTemplate.Triggers>
|
60 |
</ControlTemplate>
|
61 |
</Setter.Value>
|
62 |
</Setter>
|
63 |
</Style>
|
64 |
<Style x:Key="SimpleListViewStyle" TargetType="ListView"> |
65 |
<Setter Property="GridView.ColumnHeaderContainerStyle" Value="{StaticResource GridViewColumnHeaderStyle}" /> |
66 |
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
67 |
</Style>
|
68 |
</ResourceDictionary>
|