I am trying to superscript a wpf binding, for example:
c#
:
public string PolynomialAsString = "10x^2 + 3x - 1";
xaml
:
<TextBlock Grid.Row="1" Text="{Binding PolynomialAsString}" />
To be displayed as: 10x² + 3x - 1 in the wpf application.
The only ways I have found to do this online hardcode the position of the superscipt in the xaml
like so:
<TextBlock>
<Run>Normal Text</Run>
<Run Typography.Variants="Superscript">Superscript Text</Run>
<Run Typography.Variants="Subscript">Subscript Text</Run>
</TextBlock>
But I would like do this dynamically, as I do not know the positions of the superscripts.
Any help is greatly appreciated