WPF DataGrid Vs Windows Forms DataGridView

后端 未结 5 634
再見小時候
再見小時候 2020-12-09 10:53

I have experience in WPF and Windows Forms, however have only used the Windows Forms DataGridView and not the WPF DataGrid (which was only included in .Net 4 or could be add

5条回答
  •  -上瘾入骨i
    2020-12-09 11:28

    You can use a DataGrid WPF as a DataGridView if you at first fill ItemsSource of the DataGrid .

    MyDataGrid.ItemsSource = MySource;
    MyDataGrid.Columns[0].Width = 300;
    MyDataGrid.Columns[0].Header = "MyName";
    

提交回复
热议问题