在Windows Phone 8的ScrollViewer中没有显示大文本

时间:2014-03-14 19:32:37

标签: windows-phone-7 windows-phone-8

我在ScrollViewer中有一个TextBox。 (Windows Phone 8)

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <ScrollViewer HorizontalAlignment="Left" VerticalAlignment="Top" Width="456" UseLayoutRounding="True" ManipulationMode="Control" IsHitTestVisible="True">
            <TextBox HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Width="456" AcceptsReturn="True"/>
        </ScrollViewer>
</Grid>

当我尝试在TextBox中粘贴大量文本时,某些部分是可见的,某些部分被截断,就像这样。!

enter image description here

使用调试器我可以看到TextBox正在获取全文,它只是不可见。

任何想法,如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

ScrollViewer高度应小于TextBox高度,以便平滑滚动。硬编码高度不是正确的方法,但仍然要理解尝试设置高度=&#34; 400&#34;对于ScrollViewer和Height =&#34; 700&#34;对于ScrollViewer中的TextBox。希望它能解决问题。