开发者

"Whole" in Datagrid

开发者 https://www.devze.com 2023-02-26 15:05 出处:网络
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?

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"

0

精彩评论

暂无评论...
验证码 换一张
取 消