问题
I'm implemented a RichTextBox in WindowsPhone 8. I fill this Box while runtime with Paragraphs, Runs, Images and HyperlinkButtons. The Problem that now appears is after some lines of content the RichTextBox is cut. I declared a red border that is also cut. Links and images are still displayed. Here is a Screenshot:
My XamlCode is simple:
<Grid x:Name="LayoutRoot" Background="Transparent">
<ScrollViewer>
<RichTextBox x:Name="ContentBox" HorizontalAlignment="Stretch" VerticalAlignment="Top" BorderThickness="2" BorderBrush="Red" >
</RichTextBox>
</ScrollViewer>
</Grid>
Any idea what the problem is or is it a simulator bug?
回答1:
Given that the fill-rate counter is at 2.4 my crystal ball tells me that you're hitting the 4096px limit of size for a single UI element. If that's the case you'll have to split up the RichTextBox content between several different controls.
来源:https://stackoverflow.com/questions/13875675/renderproblem-richtextbox-windows-phone-8