Kinnara / ModernWpf

Modern styles and controls for your WPF applications
MIT License
4.43k stars 444 forks source link

How to make DataGrid more compact #564

Open ekdahl opened 1 year ago

ekdahl commented 1 year ago

I can't figure out how to make the cells in datagrids more compact. See example image below. I want the padding/margin or whatever property it is taking up the unused space to be smaller. How can I do that? I've tried setting padding, margin and more to 0 for DataGridCell but never see any difference. image

ekdahl commented 1 year ago

Found a simple solution for reducing dead space at top and bottom (globally): Application.Current.Resources["DataGridRowMinHeight"] = 24.0; Still looking for a simple solution for reducing padding at left and right.