推荐第三方编辑/语法高亮控制 - WinForms

mik*_*ymo 6 .net components winforms

我正在寻找一个高质量的WinForms组件,支持语法高亮,代码折叠等.关键标准是:

  1. 稳定性
  2. 价值(价格)
  3. 能够轻松自定义语法以突出显示
  4. 重量轻

aku*_*aku 7

ICSharpCode.TextEditor是免费且非常稳定的.
至于商业解决方案,Actipro的SyntaxEditor可能是最佳选择


Jer*_*son 5

与 Scintilla.Net 相比,增强 ICSharpCode.TextEditor 是微不足道的。ICSharpCode.TextEditor 的另一个巨大好处是允许您自定义/构建自己的语法突出显示,例如: https: //github.com/icsharpcode/SharpDevelop/wiki/Syntax-highlighting

但是 ICSharpCode.TextEditor 并不稳定,它充满了 AccessViolations:https://www.google.com.au/search ?q=icsharpcode.texteditor+accessviolationexception

您可以通过下载直接查看这些 AccessViolations: http://www.codeproject.com/Articles/30936/Using-ICSharpCode-TextEditor

GitHub 上的这个构建在 winforms 中表现更好,但在 VSTO 中它仍然尖叫 AccessViolations: https: //github.com/KindDragon/ICSharpCode.TextEditor

与DigitalRune 的 ICsharp.TextEditor 版本相同。

我推荐最新的 WPF 实现:ICSharp.AvalonEdit

如果您需要在 Winforms 中托管此 WPF 控件:

public Form1()
{
InitializeComponent();
ICSharpCode.AvalonEdit.TextEditor te = new ICSharpCode.AvalonEdit.TextEditor();
ElementHost host = new ElementHost();
host.Size = new Size(200, 100);
host.Location = new Point(100, 100);
host.Child = te;
this.Controls.Add(host);
}
Run Code Online (Sandbox Code Playgroud)


我遇到的一些商业产品(请注意,我不隶属于这些公司): http ://www.actiprosoftware.com/products/controls/windowsforms/syntaxeditor http://www.qwhale.net/products/editor.htm