Auto-RowHeight in wpf.DataGrid

I bound the DataGrid to my collection, and I need to set the binding height of each row to my property.

Is it possible? Or is there another way to associate the height of each row with the corresponding property in the collection?

+7
source share
1 answer

You can bind Height to RowStyle .

Assuming you have a RowHeight property

 <DataGrid ItemsSource="{Binding ...}"> <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Setter Property="Height" Value="{Binding RowHeight}"/> </Style> </DataGrid.RowStyle> </DataGrid> 
+10
source

All Articles