首页 / 知识

关于.net:推荐第三方编辑/语法突出显示控件-WinForms

2023-04-14 01:59:00

关于.net:推荐第三方编辑/语法突出显示控件-WinForms

Recommendation for 3rd party editing/syntax highlighting control - WinForms

我正在寻找一种高质量的WinForms组件,该组件支持语法突出显示,代码折叠等。关键标准是:

  • 稳定
  • 价值(价格)
  • 能够轻松自定义语法以突出显示
  • 轻的

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


    与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控件:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    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);
    }

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


    尝试ScintillaNET,它是围绕着出色的Scintilla控件的.NET WinFormspackage器。 Scintilla本身是一个免费的源代码编辑器组件,可高度自定义,并具有您要求的所有功能。请参阅此处以获取屏幕截图。


    语法显示第三方推荐

    最新内容

    相关内容

    热门文章

    推荐文章

    标签云

    猜你喜欢