我有一個帶有兩個文本塊的堆疊面板。問題是我的文本塊不包裝文本。 什麼是奇怪的,即使我只有一個textblock包裝也不起作用。堆疊面板中的包裝文本
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="1" Grid.ColumnSpan="2" Margin="0">
<!--<ContentControl Width="800">-->
<TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="{Binding Path=StaticTextLibrary.ApplicationSubtitle, Source={StaticResource ResourcesManager}}"
FontSize="14" HorizontalAlignment="Left" Foreground="{StaticResource text}" Opacity="0" RenderTransformOrigin="0.5,0.5"
VerticalAlignment="Bottom" Padding="5" Height="30">
<TextBlock.RenderTransform>
<CompositeTransform TranslateX="30"/>
</TextBlock.RenderTransform>
</TextBlock>
<!--</ContentControl>-->
<TextBlock x:Name="subTitlePostfix" TextWrapping="Wrap" Text="by Credit Suisse©" Margin="6,0,0,0" Opacity="0" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="{StaticResource text}" Padding="0,4,0,0" >
<TextBlock.RenderTransform>
<CompositeTransform TranslateX="30"/>
</TextBlock.RenderTransform>
</TextBlock>
</StackPanel>
我在哪裏搞錯了?
TextBlock的文本超出了堆棧面板並被剪切掉了嗎? (即:您只能看到部分文字?) – 2012-03-08 13:33:26
是的,就是這樣@Baboon – user278618 2012-03-08 13:37:08