如何为标签创建键控样式,将所有文本设置为大写?

How can I create a keyed style for a label, setting all text to UPPERCASE?

我需要创建一系列可应用于我的应用程序中的标签的键控样式。

我们的设计团队已经向我提供了具体细节,其中一项规范是 major headers 需要全部大写。

我不想管理我的资源文件中的所有大写文本,我更愿意应用一种可以为我执行此操作的样式。我读过关于 TextBlock 的排版和设置以及 TextBox 的 CharacterCasing 属性,但我找不到与标签一起使用的类似 属性。

我需要对下面的样式做些什么才能将所有文本调整为大写?

<Style TargetType="{x:Type Label}" x:Key="HEADER">
    <Setter Property="FontSize" Value="16" />
    <!-- What do I do here to convert content to UPPERCASE? -->
</Style>

尝试和 Typography.Capitals

一起玩
<Style TargetType="Label">
    <Setter Property="FontSize" Value="20"/>
    <Setter Property="Typography.Capitals" Value="AllSmallCaps"/>
</Style>

可能需要增加 FontSize

<Label Style="{x:Null}" Content="QWERTY"/>
<Label Content="qwerty"/>
<Label>
    <TextBlock Text="qwerty"/>
</Label>

结果: