WPF,DataGrid怎么设置列标题分割线的颜色
2个回答
展开全部
<Style x:Key="MiddleColumnStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
<Grid>
<DockPanel>
<Rectangle Width="1" Fill="White" DockPanel.Dock="Right"/>
<Border Background="#004ee4" Padding="18" BorderThickness="0" >
<TextBlock Foreground="White" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Center">
<ContentPresenter/>
</TextBlock>
</Border>
</DockPanel>
<Thumb x:Name="PART_RightHeaderGripper" Width="1" BorderBrush="White" BorderThickness="1"
Cursor="SizeWE" HorizontalAlignment="Right" >
</Thumb>
<Thumb x:Name="PART_LeftHeaderGripper" Width="1" Background="White" BorderThickness="1"
Cursor="SizeWE"
HorizontalAlignment="Right" >
</Thumb>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
注意两个Thumb
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询