我想将文本添加到我的标签中:area(m^2) 但 2 应该是 m 的幂。
.NET 可以做到这一点吗?

<Label Content="2 power of 3 => 3 ² " />
而不是U+00B2我写的²
但是如果你想用 C# 代码编写它,你必须使用第一种格式
label.Content = "\u00B2";
使用上标 2 字符²(unicode U+00B2)。
如果需要为任意文本添加上标,可以设置 TextBlock 的Inlines属性:
<TextBlock>
    <TextBlock.Inlines>
        <Run Text="area (m"/>
        <Run Text="2" BaselineAlignment="Superscript"/>
        <Run Text=")"/>
    </TextBlock.Inlines>
</TextBlock>
您还可以减少FontSize上标文本的 。
如果你真的需要控件是一个标签,你可以使用上面的 TextBlock 作为标签的Content属性:
<Label>
    <TextBlock>
        <TextBlock.Inlines>
            <Run Text="area (m"/>
            <Run Text="2" BaselineAlignment="Superscript"/>
            <Run Text=")"/>
        </TextBlock.Inlines>
    </TextBlock>
</Label>
这是您的问题的 WPF 解决方案:
<Window x:Class="WpfApplication1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525">
<Grid>
    <FlowDocumentReader>
        <FlowDocument>
            <Paragraph>
                <Span>number</Span>
                <Span BaselineAlignment="Superscript">2</Span>
                <Span>number</Span>
                <Span BaselineAlignment="Subscript">indexed2</Span>
            </Paragraph>
        </FlowDocument>
    </FlowDocumentReader>
</Grid>
这为您提供了下图中的结果:

您最好的选择是添加第二个标签以保持“2”并且位置高于标签 1,以使其感觉像一个正方形。