I have a data grid which uses several group styles. This works amazingly well except for one problem.
The column headers were offset from the data columns as i am using expanders and other item containers in the group style.
I solved this problem using the following code:
<!-- Extends the column header style to include a right click event handler and also to align the column headers with the data columns -->
<DataGrid.ColumnHeaderStyle>
<Style BasedOn="{StaticResource NormalDataGridColumnHeaderStyle}" TargetType="DataGridColumnHeader">
<!-- Offset the column headers to match the column data -->
<Setter Property="RenderTransform">
<Setter.Value>
<TranslateTransform X="26" />
</Setter.Value>
</Setter>
</Style>
</DataGrid.ColumnHeaderStyle>
This worked really well, however I know have a small but no less irritating problem whereby the column headers are offset leaving a small area in the header area on the extreme left where the background shows through
How can I extend the left most column header to cover this space?
In a similar vein when a scrollbar appears there is a similar gap abouve the scrollbar which i think could be a similar issue