WPF之DataGrid 1.在XAML中设置DataGrid的ItemsSource={Binding} 2.codebehind中通过dataGrid.DataContext = list来设置DataContext。