How to make a wpf datagrid fill all available space and resize with window?

Viewed 49075

How to make a wpf datagrid fill all available space and resize with window? Mind that the datagrid is inside a grid.

5 Answers

Set the width for the last column of the DataGrid to *.

<DataGridTextColumn Header="Notes"
                    Binding="{Binding Notes}"
                    Width="*"/>

Note : This actually works on only the last column of the DataGrid

Related