I'm trying to make an asterisk line up vertically with surrounding text/graphics rather than above it.
I thought applying a negative BaselineOffset would be the solution, but it seems to have no effect.
Here's the documentation for the TextBlock.BaselineOffset property:
Property Value Type: System.Double
The amount by which each line of text is offset from the baseline, in device independent pixels. Double.NaN indicates that an optimal baseline offset is automatically calculated from the current font characteristics. The default is Double.NaN.
Remarks
The baseline is the imaginary horizontal line with which the base of each character in a > line of text is aligned.
Sample markup:
<TextBlock
Name="ReadUnreadIndicator"
Grid.Column="0"
VerticalAlignment="Center"
FontWeight="Bold"
FontSize="24"
BaselineOffset="-10"
Text="*" />
No matter what I put for BaselineOffset, the asterisk always appears "superscript".
Questions:
Why isn't BaselineOffset working for me? Am I using it wrong or is it a bug in the framework?
How can I move the asterisk downward without using margin (which would create space above the TextBlock that I don't want)?