我有一个TextBlock
嵌套在 Viewbox 中。
<Viewbox x:Name="ContentPanel">
<TextBlock x:Name="CharacterBlock" TextAlignment="Center" Text="愛" />
</Viewbox>
我怎么知道的高度和宽度TextBlock
?RenderSize
并且ActualWidth/Height
全部返回其原始大小,而不是由 Viewbox 缩放的大小。
我有一个TextBlock
嵌套在 Viewbox 中。
<Viewbox x:Name="ContentPanel">
<TextBlock x:Name="CharacterBlock" TextAlignment="Center" Text="愛" />
</Viewbox>
我怎么知道的高度和宽度TextBlock
?RenderSize
并且ActualWidth/Height
全部返回其原始大小,而不是由 Viewbox 缩放的大小。