从 dll 或 xml 读取 RadSyntaxEditor 中的智能提示数据

Read data for Inteliprompts in RadSyntaxEditor from dll or xml

RadSyntaxControl 是 Telerik 新创建的控件,具有 InteliPrompts 的功能,但在每个示例中,我发现用户必须手动填充 CompletionInfoCollection,如您在此示例中所见。

CompletionInfoCollection completionList = new CompletionInfoCollection()
{
    new CompletionInfo("Achitect", "A software developer expert.", Image.FromFile(@"../../SyntaxEditor/ Achitect.png")),
};

this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.CompletionListWindow.Presenter.CompletionListItems = completionList;

如果只有几个项目可以自动完成,那没关系,但如果我想为像 C# 这样的语言自动完成怎么办。 Telerik 有一个针对 C# 的语法突出显示,但我找不到以这种方式用数据填充 IntelliPromts 的方法。

示例代码来自Telerik Blogs

谢谢:)

内纳德,

如您所知,RadSyntaxEditor 使用 CompletionInfoCollection 来定义智能提示,旨在通过减少拼写错误和其他常见错误来加快编码速度。只需要为完成列表 window 中所需的每个项目定义一个单独的 CompletionInfo。显示什么列表以及如何获取此信息由您决定。此工作不打算由 RadSyntaxEditor 控件完成。以下帮助文章中提供了更多信息:https://docs.telerik.com/devtools/winforms/controls/syntax-editor/features/intelliprompts

我在论坛上进行了研究,由于 Visual Studio 中嵌入了英文版的 IntelliSense 文件,因此我找到了以下 MSDN 文章,其中为 IntelliSense 提供了不同的语言包。因此,您至少可以使用它来调查关键字是什么,并根据需要替换翻译:https://docs.microsoft.com/en-us/dotnet/core/install/localized-intellisense

希望这些信息对您有所帮助。