I need to show a really huge amount of text data in my piece of code - first i tried to use TextBox (and of course it was too slow in rendering). Now i'm using FlowDocumentView - and its awesome but recently i have had another request - text shouldnt be hyphenated. Well actually it is not (
document.IsHyphenationEnabled = false;
) but i still dont see my precious horizontal scroll bar. if i magnify scale text is ... hyphenated.
public string TextToShow
{
set
{
Paragraph paragraph = new Paragraph();
paragraph.Inlines.Add(value);
FlowDocument document = new FlowDocument(paragraph);
document.IsHyphenationEnabled = false;
flowReader.Document = document;
flowReader.IsScrollViewEnabled = true;
flowReader.ViewingMode = FlowDocumentReaderViewingMode.Scroll;
flowReader.IsPrintEnabled = true;
flowReader.IsPageViewEnabled = false;
flowReader.IsTwoPageViewEnabled = false;
}
}
That's how i create FlowDocument - and here comes part of my wpf-control:
<FlowDocumentReader Name="flowReader" Margin="2 2 2 2" Grid.Row="0"/>
Nothing criminal =))
I'd like to know how to tame this beast - googled nothing helpful. Or you have some alternative way to show megabytes of text, or textbox have some virtualization features which i need just to enable. Anyway i'll be happy to hear your response!