WPF DataGrid horizontal scrollbar not showing

后端 未结 7 1924
眼角桃花
眼角桃花 2021-02-05 08:14

I have created simple DataGrid with 4 columns, which go outside the bounds of DataGrid, and horizontal scrollbar is not showing. I tried setting width to each column but nothing

7条回答
  •  南方客
    南方客 (楼主)
    2021-02-05 08:29

    I think that when the Datagrid is empty, the ScrollViewer doesn't handle anything. Try to fill the columns by adding an ItemsSource, the scrolling should therefore appear :)

提交回复
热议问题