Superscript or subscript in TextBlock

扶醉桌前 提交于 2019-12-06 08:31:12

Either use Segoe WP font

Or can do like this

<StackPanel Orientation="Horizontal">
    <TextBlock FontFamily="Segoe UI" FontSize="16" Text"Normal Text"/>
    <TextBlock FontFamily="Segoe UI" FontSize="9" Text="&#174;"/>
</StackPanel>

I used 60% lesser font for trademark symbol

This looks nice for a subscsript Run in a TextBlock on my screen, using VS2015:

<Style TargetType="{x:Type Run}" x:Key="Sub">
    <Setter Property="FontSize" Value="10"/>        
    <Setter Property="BaselineAlignment" Value="TextBottom"/>
</Style>

It's just a bit lower than Typography.Variants = Subscript, which seems to use just a smaller font

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!