title: Best way to show huge text in WPF?
body: <p>I need to show a really huge amount of text data in <strong>WPF</strong> code. First i tried to use <a href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox" rel="nofollow noreferrer">TextBox</a> (and of course it was too slow in rendering). Now i'm using <a href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.documents.flowdocument" rel="nofollow noreferrer">FlowDocument</a>--and its awesome--but recently i have had another request: text shouldnt be hyphenated. Supposedly it is not (<code>document.IsHyphenationEnabled = false</code>) but i still don't see my precious horizontal scroll bar. if i magnify scale text is ... hyphenated.</p>
  
  <p><a href="https://i.stack.imgur.com/z6fkz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z6fkz.png" alt="alt text"></a></p>
  
  <pre><code>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;
      }
  }
  </code></pre>
  
  <p>That's how i create FlowDocument - and here comes part of my WPF control:</p>
  
  <pre><code>&lt;FlowDocumentReader Name="flowReader" Margin="2 2 2 2" Grid.Row="0" /&gt;
  </code></pre>
  
  <p>Nothing criminal =))</p>
  
  <p>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!</p>