Category / Section
How to programmatically display code snippets in WinForms SyntaxEditor (EditControl)?
4 mins read
Show code snippet
It is possible to display code snippets programmatically using the StreamEditControl class. Please refer below code snippets that illustrates this.
C#
private void editControl1_ReadOnlyChanged(object sender, EventArgs e) { edit = (StreamEditControl)sender; } private void menuItem15_Click(object sender, EventArgs e) { edit.ShowCodeSnippets(); }
VB
Private Sub editControl1_ReadOnlyChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles editControl1.ReadOnlyChanged edit = CType(sender, StreamEditControl) End Sub Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click edit.ShowCodeSnippets() End Sub
Reference link: https://help.syncfusion.com/windowsforms/syntax-editor/appearance#append-code-snippets