【问题标题】:how to show gridline in the column header after applying background应用背景后如何在列标题中显示网格线
【发布时间】:2011-05-28 02:50:40
【问题描述】:

为列标题应用背景后,网格线不再可见。有什么简单的方法可以恢复网格线?

【问题讨论】:

    标签: wpf silverlight wpfdatagrid


    【解决方案1】:

    您可以为 DataGridColumnHeader 指定 BorderBrush 和 BorderThickness。示例

    <DataGrid.Resources>
        <Style TargetType="{x:Type DataGridColumnHeader}">
            <Setter Property="Background" Value="Blue"/>
            <Setter Property="BorderBrush" Value="Red"/>
            <Setter Property="BorderThickness" Value="1,1,1,1"/>
        </Style>
    </DataGrid.Resources>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-21
      • 1970-01-01
      • 1970-01-01
      • 2011-05-28
      相关资源
      最近更新 更多