2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Font settingsIt is possible to change the font settings of the Formats in the EditControl programmatically using the ISnippetFormat.Font property as shown in code snippets below. C# private void ApplyFont() { SnippetFormat format; Config c=this.editControl1.Configurator; IConfigLanguage configlang=c.GetLanguage("cs"); ConfigLanguage configlanguage=configlang as ConfigLanguage; for( int i = 0, len = configlanguage.Count; i < len; i++ ) { format = configlanguage[ i ] as ISnippetFormat; format.Font =new Font(this.newfont,fontstyle); } editControl1.ApplyConfiguration(configlanguage); }
VB Private Sub ApplyFont() Dim format As Syncfusion.Windows.Forms.Edit.Interfaces.ISnippetFormat Dim c As Syncfusion.Windows.Forms.Edit.Implementation.Config.Config = Me.EditControl1.Configurator Dim configlang As Syncfusion.Windows.Forms.Edit.Interfaces.IConfigLanguage = c.GetLanguage("vb") Dim configlanguage As Syncfusion.Windows.Forms.Edit.Implementation.Config.ConfigLanguage = CType(IIf(TypeOf configlang Is ConfigLanguage, configlang, Nothing), ConfigLanguage) Dim i As Integer = 0 Dim len As Integer = configlanguage.Count Do While i < len format = CType(IIf(TypeOf configlanguage(i) Is Syncfusion.Windows.Forms.Edit.Interfaces.ISnippetFormat, configlanguage(i), Nothing), ISnippetFormat) format.Font = New Drawing.Font(Me.newfont, fontstyle) i += 1 Loop EditControl1.ApplyConfiguration(configlanguage) End Sub End Class
Reference link: https://help.syncfusion.com/windowsforms/syntax-editor/syntax-highlighting#configure-custom-language-using-code |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.
**
_strong text