Question

I'm working on a windows forms application that reads and displays source code files from my hard drive. I'm not sure which control would be best suited for this. Is there any library that will allow me to display the source code with colors and numbered code-lines?

EDIT: To clarify, what i'm looking for is a way to display the code with colors and line-numbers, no need for editing. The application is to be used by a teacher, allowing him to view source code files handed in by his students. The teacher doesn't have to be able to edit the files.

Was it helpful?

Solution

ScintillaNet is a WinForms control which is a .NET wrapper of the excellent Scintilla library and is quite good. Avalon which is mentioned in another answer is also very good, but it is an WPF control (of course, WPF controls can be added to WinForms forms by using ElementHost controls, but it will introduce additional complexity which may or may not be warranted).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top