I'm trying to vertical center a multiline textbox within a RectangleFigure in GEF. It needs to be ajusted on resize.
This would be best done with a layout, but I can't figure out how that works.
I'm adding a BorderMargin to the parent FlowPage and changing the margin when the RectangleFigure gets resized. Unfortunately, at that particular point, the TextFlow hasn't been layouted and it often no longer has the correct number of lines.
Given that all I need is the number of lines, how can I calculate that.
Alternatively, what does an "auto-centering" layout look like?