Search code examples
winformstelerik

Read data for Inteliprompts in RadSyntaxEditor from dll or xml


RadSyntaxControl is newly created control from Telerik and has a feature for InteliPrompts but in every sample, I found out the user must manually populate CompletionInfoCollection, as you can see in this example.

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

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

It is ok if there are just a few items for autocomplete but what in a case if I want to autocomplete for language like C#. Telerik has a syntax highlight for C#, but I cannot find a way to populate IntelliPromts with data in that manner.

The sample code is from Telerik Blogs

Thank you :)


Solution

  • Nenad,

    As you have already found out, RadSyntaxEditor uses a CompletionInfoCollection to define intelliprompts which aim to speed up coding by reducing typos and other common mistakes. It is just necessary to define a separate CompletionInfo for each item that you want in the completion list window. It is up to you what list to be displayed and how you will get this information. This job is not intended to be done by the RadSyntaxEditor control. Additional information is available in the following help article: https://docs.telerik.com/devtools/winforms/controls/syntax-editor/features/intelliprompts

    I have researched in the forums and since the English version of IntelliSense files are embedded in Visual Studio, I have found the following MSDN article which offers different language packs for the IntelliSense. Hence, you can at least use it to investigate what are the keywords and replace the translation according to your needs: https://learn.microsoft.com/en-us/dotnet/core/install/localized-intellisense

    I hope this information helps.