I have a DataGrid and I would like to have my first column’s cells all render some custom XAML.
Currently I have just the grid:
<DataGrid CanUserSortColumns="False" SelectionUnit="FullRow" HeadersVisibility="Column" ItemsSource="{Binding Test}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=Foo}" Header="Foo"></DataGridTextColumn>
<DataGridTextColumn Binding="{Binding Path=Bar}" Header="Bar"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
For starters, I would like to be able to add some specific WPF control/XAML into the first column’s cells.
You just need to use a
DataGridTemplateColumnwith aCellTemplate: