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
| Style TargetType="{x:Type GridViewColumnHeader}" x:Key="gridViewColumnStyle"
Setter Property="HorizontalContentAlignment" Value="Stretch"/
Setter Property="VerticalContentAlignment" Value="Stretch"/
Setter Property="Background" Value="{StaticResource GridViewHeaderBackgroundColor}"/
Setter Property="BorderBrush" Value="{StaticResource GridViewHeaderForegroundColor}"/
Setter Property="BorderThickness" Value="0"/
Setter Property="Padding" Value="2,0,2,0"/
Setter Property="Foreground" Value="{StaticResource GridViewHeaderForegroundColor}"/
Setter Property="Template"
Setter.Value
ControlTemplate TargetType="{x:Type GridViewColumnHeader}"
Grid SnapsToDevicePixels="true" Tag="Header" Name="Header"
ContentPresenter Name="HeaderContent" Margin="0,0,0,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /
Canvas
Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}"/
/Canvas
/Grid
ControlTemplate.Triggers
Trigger Property="IsMouseOver" Value="true"
/Trigger
Trigger Property="IsPressed" Value="true"
Setter TargetName="HeaderContent" Property="Margin" Value="1,1,0,0"/
/Trigger
Trigger Property="Height" Value="Auto"
Setter Property="MinHeight" Value="20"/
/Trigger
Trigger Property="IsEnabled" Value="false"
Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/
/Trigger
/ControlTemplate.Triggers
/ControlTemplate
/Setter.Value
/Setter
/Style |