这是我的问题和下面的代码的图片。我想知道如何使文本右上方翻转。以下也是我获得有关将比例转换Y设置为1的建议的链接。
<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>