I am using the DataGrid control from WPF Toolkit release February 2010 (.net framework 3.5) and after setting text wrap for the cells of the table I have noticed that the DataGrid is displayed with a lot of free space after the last row.
The amount of free space seems to be proportional with the numbers of rows (but it's not always the case).
When I manually delete one of the rows, the DataGrid is displayed correctly and the free space is removed. But if I delete a row in code behind at load time, it has no effect and the free space is still displayed. My guess is that the trick only works after the DataGrid has been rendered. Editing the content of a cell does not trigger the resize.

Notes:
I tried to set a MaxHeight for the DataGrid but it does not work to well because of the text wrapping.
I've overwritten the
Size MeasureOverride(Size availableSize)method of the DataGrid and noticed that the method is called multiple times, and that at first the size is right and after one or two more calls it increases. AlsoavailableSizehas infinite Height.
Any idea how I can fix the height of the DataGrid?
EDIT:
I created a small demo to show case my problem. The project needs a reference to WPFToolkit.
Notice the first and second DataGrid.