Answer the question
In order to leave comments, you need to log in
RichTextBox for WPF faster than native?
In the window I display the log of a rather long process (5000 operations on average, 10 lines each, then there will be more up to 500k lines)
As you know, plain text is poor :) for example, on MacOS in a standard notepad there is only rich text.
here, for ease of reading and for beauty, some of the lines have their own color, some of the pieces of text are highlighted with a yellow marker, maybe there will even be links or even cooler - spoilers from UIElement.
But after a lot of lines have accumulated, the log slows down both in selecting its pieces with the mouse (and the pieces are very small) and - what is most unpleasant - in adding lines itself.
Is there something faster?
I decided to try three options - Syncfusion, Telerik and ComponentOne - and measure. And none of them worked at all .
Obviously not my day.
(I figured it out with the first one, did everything by analogy with the original, everything works, but the line added is not visible.
The second one crashes when simply adding rtb itself to an empty window of a freshly created project exactly according to the Getting started manual. I
figured out the third one, did everything according to analogy with the original, everything works, but the line added is not visible.I
write to support...)
The only one that worked was AvalonEdit , but it was designed for syntax highlighting, and I did not understand how to simply take and set the font for such and such a section in it. And it's kind of primitive.
I wonder if it even makes sense to look for something?
Answer the question
In order to leave comments, you need to log in
The main problem is that you are loading a large chunk of data into a text field. Why don't you approach this problem from the other side - for example, do not use a Grid with pagination or the same RichTextBox, but the data in the topics will be displayed page by page. Also, you can add data "loading" by subscribing to a scroll event - if you reach, say, 75% of the rows, load the data, unload it into the first block after reaching 100%.
Do you seriously want to add a multi-million dollar scroll log to your program? I would like to see how you read this log) The log is the log, that no one reads it during the normal operation of the application. And if an error occurs, it makes no sense to look at the millionth line for the file io exception. Don't write everything to the log and save it more often to separate files + don't output them at all. For a normal program 90%. such logs - a file sump that takes up space.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question