我想从Aero中的默认样式开始创建自定义ListView样式。我删除了所有的aero bull代码,只留下了基本的东西,但现在,我想自定义listview标题的外观
GridViewHeaderRowPresenter
必须自定义此元素的样式,使其看起来像我想要的样子。但是,似乎我不能这样做。我尝试用
替换它GridViewColumnHeader
然后所有的绑定都消失了。有什么提示吗?
答案 0 :(得分:0)
<Style.Triggers>
<Trigger Property="Role" Value="Padding">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<Border x:Name="HeaderBorder" BorderBrush="{DynamicResource BRUSH_ListView_HeaderBorderBorderBrush_ALL}" BorderThickness="0,1,0,1" Background="{DynamicResource BRUSH_ListView_HeaderBorderBackground_UP}">
<Border x:Name="borderHighlight" BorderBrush="{DynamicResource BRUSH_ListView_borderHighlightBorderBrush_UP}" BorderThickness="0,1,0,0" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Height" Value="Auto">
<Setter Property="MinHeight" Value="20"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>