WPF DataGrid垂直滚动条问题

对datagrid添加垂直滚动条,它的高度只会显示到标题栏的下方,而标题栏的宽度又不会延伸到滚动条上方。

img

右上角那一块儿是空白的
如何设置滚动条与标题栏等高;
或者将标题栏的宽度延伸到滚动条的上方。

问题已解决,在Resources中添加下列style即可扩展标题行

<Style x:Key="{x:Type DataGridColumnHeadersPresenter}" TargetType="{x:Type DataGridColumnHeadersPresenter}">
            <Setter Property="Grid.ColumnSpan" Value="2" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">
                        <Grid>
                            <DataGridColumnHeader IsHitTestVisible="False" Name="PART_FillerColumnHeader"/>
                            <ItemsPresenter/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
```c#



```