I have about 800 KB of text that I want to display on the screen. Can someone tell me about a possible solution to this issue?
From outside the text block 2048X2048, I already tried to split the text into several text blocks, and also tried http://blogs.msdn.com/b/priozersk/archive/2010/09/08/creating-scrollable-textblock-for -wp7.aspx . This, although it works for data up to 40-50 KB, does not scale to 800 KB.
I also tried using Listbox (as mentioned in the first solution in the next post). wp7 - TextBlock with lots of text - huge memory usage - how to avoid it?
This (shown below) also works up to 80-100KB, and after that it takes too much time to load the text.
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <ListBox x:Name="myListBox" Width="468" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <toolkit:WrapPanel /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <TextBlock FontSize="20" Text="{Binding}" TextWrapping="Wrap" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid>
abnvp source share