프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Resources / SimpleLIstViewStyle.xaml @ ac4f1e13

이력 | 보기 | 이력해설 | 다운로드 (3.79 KB)

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