Set VerticalAlignment in DrawText
Well Ok it seems I was able to solve this. It is not that hard. I'll post the answer here for future reference. And It might help other people too.
As it seems there is not such a thing as VerticalAlignment
for a FormattedText
so we need to calculate and position it ourselves. Since we can get the Height
property of the formatted text. We can easily align the text like this:
dc.DrawText(ft, new Point(centerpoint.X, centerpoint.Y- ft.Height/2));