我怎样才能变换边框而不是里面的内容?

How can I transform a border but not the content inside?

这是我的问题的图像和下面的代码。我想知道如何让文字正面朝上翻转。下面还有一个 link,我从中得到了将缩放变换 Y 设置为 1 的建议。

https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/how-to-flip-a-uielement-horizontally-or-vertically

<Viewbox>
                <Grid>
                  <ItemsControl ItemsSource="{Binding FaceParts}">
                    <ItemsControl.ItemsPanel>
                      <ItemsPanelTemplate>
                        <Canvas Background="SlateBlue" Height="140" Width="80" />
                      </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>

                    <ItemsControl.ItemContainerStyle>
                      <Style TargetType="ContentPresenter">
                        <Setter Property="RenderTransform" Value="1 0 0 -1 0 0"/>
                        <Setter Property="Canvas.Left" Value="{Binding X}"/>
                        <Setter Property="Canvas.Top" Value="{Binding Y}"/>
                      </Style>
                    </ItemsControl.ItemContainerStyle>
                    <ItemsControl.ItemTemplate>
                      <DataTemplate>
                        <StackPanel>
                          <Border Width="{Binding Width}" Height="{Binding Height}" Background="{Binding Fill}" BorderBrush="Black" BorderThickness=".20">
                            <Viewbox>
                              <TextBlock Text="{Binding TextOverlay}" RenderTransformOrigin=".5,.5">
                                <TextBlock.RenderTransform>
                                  <ScaleTransform ScaleY="1"/>
                                </TextBlock.RenderTransform>
                              </TextBlock>
                            </Viewbox>
                          </Border>
                        </StackPanel>
                      </DataTemplate>
                    </ItemsControl.ItemTemplate>
                  </ItemsControl>

                  <Viewbox  VerticalAlignment="Bottom"  Height="5" Margin="0,0,0,5">
                    <TextBlock  Background="SlateBlue"  TextAlignment="Center" Text="{Binding SelectedViewerProduct.Width, Converter={StaticResource FractionConverter}}"/>
                  </Viewbox>

                </Grid>
              </Viewbox>

事实证明,将 ScaleY 设置为正数对将其正面向上翻转没有影响,为了将其正面向上翻转,我必须将 ScaleY 设置为 -1。本质上是将它再次朝相反的方向翻转,使其正面朝上。