Set superscript and subscript in formatted text in wpf

Firoz picture Firoz · Jan 19, 2010 · Viewed 26.2k times · Source

How can I set some text as subscript/superscript in FormattedText in WPF?

Answer

Reed Copsey picture Reed Copsey · Jan 19, 2010

You use Typography.Variants:

<TextBlock>
    <Run>Normal Text</Run>
    <Run Typography.Variants="Superscript">Superscript Text</Run>
    <Run Typography.Variants="Subscript">Subscript Text</Run>
</TextBlock>