locked
DataGrid vertical grid lines are not connected RRS feed

  • Question

  • I have a wpf datagrid. If there is no style for DataGridCell, the vertical grid lines are connected. If I set the DataGridCell style as the following, the vertical grid lines are NOT connected anymore.

    <Style TargetType="{x:Type DataGridCell}">
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    Connected grid lines:

    Not connected grid lines:

    How to solve this problem to make vertical grid lines are connected when vertical alignment is centered?

    Thanks in advance!!!

    Tuesday, December 4, 2012 8:21 PM