如何改变DataGrit每行的行宽?

使用DataGrid中的属性值ColumnWidth的属性值

例如:

在用户界面我们先设置

<DataGrid Name="dataGrid" ItemsSource="{Binding}"></DataGrid>

后台代码中再进行编写

dataGrid.ColumnWidth = 80;

这样就可控制DataGrid中每列的宽度

posted @ 2020-08-15 09:57  Julian_jiang  阅读(141)  评论(0编辑  收藏  举报