C # which wpf control is used to display a text file

What is the best control to use in the wpf applicaion to download large text files? And this is not just like me, I need to be able to charter / change the background / color of some lines. I was thinking about using RichTextBox .. but although I just came and asked what other people think.

I do not need to edit the text, just highlight the lines with errors

EDIT: Ah, I forgot to mention, the contents of the text file is processed by the program, which will change the background color of some lines. It would be nice to let the user do the same when the program could not find some error lines.

EDIT2: The application is designed to analyze log files, so the files can be large, more than 50,000 lines.

+3
source share
2 answers

I did not understand if you want to display files or allow users to edit them.

In any case, you may find ScintillaNET useful.

Well-known text editor, Notepad ++ uses Scintilla :)

You could grab the sources of notepad ++ at http://sourceforge.net/projects/notepad-plus/ , but it is written in C ++, so the API will be slightly different than what is in .NET.

EDIT

Notepad ++ is capable of displaying files about 100-200 MB in size. If you need better, you will need to implement some kind of paging technology / virtual mode (do not download the entire file, but only the part that will be displayed on the screen depending on the current position of the scroll bar)

Scintilla , , , DataGrid. , . , LogEntry, . , .

+2

, RichTextBox , CharithJ , , .

, RichTextBox . , , . , , "" "", - richbox .

- , RichTextBox, RichTextBox . , RichTextBox.

+1
source

All Articles