I have build a datagrid, but there is a "whole" between the columnheader and the scrollbar. Is there a way in开发者_如何学编程 xaml to put the header over the scrollbar?
screenshot: http://www.pictureupload.de/originals/pictures/190411124345_grid.JPG
If you have a look at the style for your DataGrid then you will see the vertical scroll bar defined in the template something like this:
<ScrollBar Grid.Row="1"
Grid.Column="2"
Name="PART_VerticalScrollBar"
Orientation="Vertical"
Maximum="{TemplateBinding ScrollableHeight}"
ViewportSize="{TemplateBinding ViewportHeight}"
Value="{Binding Path=VerticalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
What you need to do is change the Grid.Row="0" and set Grid.RowSpan="2"
精彩评论