如何将文本与其中的超链接居中对齐?

How can I center align text with hyperlinks in it?

如何居中对齐带有超链接的文本?

我需要下面的一些文字,并且 XAML 我知道它目前没有居中。事实上,Horizo​​ntal Alignment 似乎没有任何作用。但是,超链接工作正常。

这是一个包含 2 列的网格,我需要 ColumnSpan 为 2。

谢谢。

"By clicking Sign In, you agree to our [HYPERLINK: Privacy Policy] and [HYPERLINK: Terms of Use.]"

    <TextBlock Grid.Row="3" Grid.ColumnSpan="2" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="18px">
        <Run Text="By clicking Sign In, you agree to our " /> 
        <Hyperlink NavigateUri="https://www.my-company-website.com/privacy-policy/" RequestNavigate="Hyperlink_RequestNavigate">
            Privacy Policy
        </Hyperlink>
        <Run Text=" and "/>
        <Hyperlink NavigateUri="https://www.my-company-website.com/terms-and-conditions/" RequestNavigate="Hyperlink_RequestNavigate">
            Terms of Use.
        </Hyperlink>
    </TextBlock>

我认为您正在寻找 TextAlignment 属性。将此设置为 Center:

<TextBlock TextAlignment="Center" ...