Hello!

I work with WPF. The following problem occurred:

I display text in TextBox (attributes: TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True" - for the implementation of Multiline=true ). When the window is resized (the size of the TextBox also changes) it hangs with a large number of characters (20k +) in the TextBox, and the more characters, the worse.

How to fix the moment?

  • 2
    Do not use textbox? It is hardly intended for such huge texts. - VladD
  • @VladD, and which element in this case to use? - Ivan Lazarev
  • 2
    Try RichTextBox. If it does not fit the processing speed of huge texts, I’ll have to, I am afraid, write my own bicycle. - VladD
  • @VladD, but then you have to line the data into the document line by line. And to be honest, I can’t imagine what kind of bike I will have to write. Do not tell me which way to dig in this case? - Ivan Lazarev
  • one
    Why with RichTextBox line by line? In which direction to dig a bicycle - well, implement the control effectively and manually, for example, using background splitting into lines and outputting lines to the TextBlock 's set, plus manual implementation of the cursor and editing. A good piece of work, yes. - VladD

0