Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can disable the Horizontal Grid Lines which are drawn in code by specifying <code>GridLinesVisibility="Vertical"</code> in the <code>DataGrid</code>. You could then re-template <code>DataGridRow</code> and add the dashed line at the end of each row</p> <p>Looks like this:</p> <p><img src="https://i.stack.imgur.com/n1C5F.png" alt="enter image description here"></p> <pre><code>&lt;DataGrid GridLinesVisibility="Vertical"&gt; &lt;DataGrid.RowStyle&gt; &lt;Style TargetType="DataGridRow"&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type DataGridRow}"&gt; &lt;Border x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"&gt; &lt;SelectiveScrollingGrid&gt; &lt;SelectiveScrollingGrid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto"/&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;/SelectiveScrollingGrid.ColumnDefinitions&gt; &lt;SelectiveScrollingGrid.RowDefinitions&gt; &lt;RowDefinition Height="*"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;/SelectiveScrollingGrid.RowDefinitions&gt; &lt;DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/&gt; &lt;DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/&gt; &lt;DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/&gt; &lt;Path Grid.Row="2" Grid.ColumnSpan="2" Data="M0,0.5 L1,0.5" Stretch="Fill" Stroke="Black" StrokeThickness="1" StrokeDashArray="1.0 2.0"/&gt; &lt;/SelectiveScrollingGrid&gt; &lt;/Border&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/DataGrid.RowStyle&gt; &lt;!-- ... --&gt; &lt;/DataGrid&gt; </code></pre> <p><strong>Edit:</strong> Here is the Template for the 3.5 <code>DataGrid</code> in the toolkit</p> <pre><code>&lt;Custom:DataGrid GridLinesVisibility="Vertical"&gt; &lt;Custom:DataGrid.RowStyle&gt; &lt;Style TargetType="Custom:DataGridRow"&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type Custom:DataGridRow}"&gt; &lt;Border x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"&gt; &lt;Custom:SelectiveScrollingGrid&gt; &lt;Custom:SelectiveScrollingGrid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto"/&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;/Custom:SelectiveScrollingGrid.ColumnDefinitions&gt; &lt;Custom:SelectiveScrollingGrid.RowDefinitions&gt; &lt;RowDefinition Height="*"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;/Custom:SelectiveScrollingGrid.RowDefinitions&gt; &lt;Custom:DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/&gt; &lt;Custom:DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" Visibility="{TemplateBinding DetailsVisibility}"&gt; &lt;Custom:SelectiveScrollingGrid.SelectiveScrollingOrientation&gt; &lt;Binding Path="AreRowDetailsFrozen" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type Custom:DataGrid}}"&gt; &lt;Binding.ConverterParameter&gt; &lt;Custom:SelectiveScrollingOrientation&gt;Vertical&lt;/Custom:SelectiveScrollingOrientation&gt; &lt;/Binding.ConverterParameter&gt; &lt;/Binding&gt; &lt;/Custom:SelectiveScrollingGrid.SelectiveScrollingOrientation&gt; &lt;/Custom:DataGridDetailsPresenter&gt; &lt;Custom:DataGridRowHeader Grid.RowSpan="2" Custom:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"&gt; &lt;Custom:DataGridRowHeader.Visibility&gt; &lt;Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type Custom:DataGrid}}"&gt; &lt;Binding.ConverterParameter&gt; &lt;Custom:DataGridHeadersVisibility&gt;Row&lt;/Custom:DataGridHeadersVisibility&gt; &lt;/Binding.ConverterParameter&gt; &lt;/Binding&gt; &lt;/Custom:DataGridRowHeader.Visibility&gt; &lt;/Custom:DataGridRowHeader&gt; &lt;Path Grid.Row="2" Grid.ColumnSpan="2" Data="M0,0.5 L1,0.5" Stretch="Fill" Stroke="Black" StrokeThickness="1" StrokeDashArray="1.0 2.0"/&gt; &lt;/Custom:SelectiveScrollingGrid&gt; &lt;/Border&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/Custom:DataGrid.RowStyle&gt; &lt;!-- ... --&gt; &lt;/Custom:DataGrid&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload