Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF: How to implement custom Grid with CellSpacing?

I miss the HTML-cellspacing in WPF. Im trying to implement something similar in WPF's Grid by making a custom Grid-class overriding from Grid and then modifying MeasureOverride and ArrangeOverride to get the behaviour I want. Which is that each cell in a grid should have a fixed spacing (not padding) to each other cell. How could this be done?

like image 979
Andreas Zita Avatar asked Nov 04 '22 23:11

Andreas Zita


1 Answers

I found this blog post about creating a custom grid panel that handles spacing between cells: http://daniel-albuschat.blogspot.dk/2011/07/gridlayout-for-wpf-escape-margin-hell.html

like image 95
Pete Avatar answered Nov 14 '22 21:11

Pete