以下是该控件的源代码和自己草编的简单使用例程:
ICSharpCode.TextEditor1.1的源代码:【下载】
ICSharpCode.TextEditor2.2的源代码:【下载】
自己编的使用例程:【下载】
使用效果:
使用该控件的关键句子:
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Gui.CompletionWindow;
using ICSharpCode.TextEditor.Document;
using ICSharpCode.TextEditor.Actions;
textEditorControl1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("C#");
textEditorControl1.Encoding = System.Text.Encoding.Default;
textEditorControl1.Text = "Hello Word";
这几句代码若是不写的话,会无法高亮显示代码且汉字会变乱码的。切记