views:

2451

answers:

2

Folks,

I'm looking for a syntax-highlighting Textbox component, preferably free, with source, and capable of being used in Winforms, ASP.NET and WPF alike. Also, it should support not just display, but also editing contents.

I've discovered the excellent, FREE ActiPro SyntaxHighlighter for ASP.NET - but that's unfortunately ONLY for ASP.NET :-( and it only displays text in syntax highlighted manner - no editing capabilities.....

I also know of the "ICSharp Text Editor" component that's part of SharpDevelop - but that's then a standalone, but Winforms only, solution.

Does anyone know of a component that has a core to handle the syntax-highlighting (configurable, so I can use it for C# code, XML and HTML files, and more), and that has three "skins" for Winforms, ASP.NET and WPF ?? I'd really prefer to have ONE core that does the heavy lifting, and three UIs on top sharing that core code....

Any pointers and hints are welcome!

Marc

+1  A: 

All those platforms are completely different and each have their own rendering display methods. So there won't be any universal control that does all. Each platform will have a separate control

However, one can implement a web control and use it in a page. Then a browser object in winforms or wpf can use the page address to display it

Can Erten
Oh,I totally understand the *rendering* part can't be the same for all - but all the other stuff, like the rules, which parts to highlight with what color, and detecting keywords etc., all could be shared.....
marc_s
+2  A: 

I'm with you marc: I'd love to see an extensible syntax highlighting framework that could generate a tokenized "document" object which could then be displayed via controls for each display framework. This way the parser/tokenizer could be written once!

The best I can say is that this thread suggests that ActiProSoftware is working on a WPF control for their syntax highlighter.

Jaykul