Category / Section
How to modify dynamically added configuration settings at runtime in WinForms SyntaxEditor (EditControl)?
1 min read
Configuration settings
You could simply modify the dynamically added configuration settings at runtime by getting the associated ISnippetFormat object and settings its appropriate properties.
C#
ISnippetFormat formatMethod = this.editControl1.Language["MethodName"] as ISnippetFormat; formatMethod.FontColor = Color.Orange; formatMethod.Font = new Font("Garamond",12, FontStyle.Bold | FontStyle.Italic);
VB
Dim formatMethod As ISnippetFormat = Me.editControl1.Language("MethodName") formatMethod.FontColor = Color.Orange formatMethod.Font = New Font("Garamond", 12, FontStyle.Bold Or FontStyle.Italic)
Reference link: https://help.syncfusion.com/windowsforms/syntax-editor/syntax-highlighting#configure-custom-language-using-code