I have a rect, inside which text is going. Using TextAlignmentOptions.Bottom
, the behavior is nearly identical to what I would like - the first line of text is flush with the bottom, until it requires a second line, at which point the second line is flush with the bottom of the rect. The issue is that currently it is flush using the bottom of the text, while I would like it to be flush using the baseline of the text. If I use TextAlignmentOptions.Baseline
, then it lines up correctly when there are two lines of text, however, when there is only a single line of text it is at the top of the rect.
Is there a way to achieve what I’m looking for simply? If not, I assume my best bet would be manually offsetting my rect? If that’s the case, is there a way to get the distance between the bottom and the baseline to set the offset regardless of text configuration? Thanks for any help.