/syncfusion-winforms:syncfusion-winforms-syntax-editorfrom Syncfusion WinForms Controls
Guide for implementing Syncfusion EditControl (SyntaxEditor) in Windows Forms applications. Use when creating interactive code editors with syntax highlighting, IntelliSense, multi-language support, or Visual Studio-like editing capabilities. Covers installation, syntax highlighting for 11 built-in languages (C#, VB.NET, XML, HTML, Java, SQL, PowerShell, JavaScript), custom language configuration, code outlining, auto-completion, find/replace dialogs, file operations, export (XML/RTF/HTML), split views, and comprehensive event handling for building professional code editor applications.
Ships in Syncfusion WinForms Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill guides the implementation of Syncfusion's EditControl, a powerful text editor control for creating interactive code editor applications with Visual Studio-like features including syntax highlighting, IntelliSense, code outlining, and comprehensive editing capabilities.
Use this skill when you need to:
Control: EditControl
Namespace: Syncfusion.Windows.Forms.Edit
Assemblies Required:
Syncfusion.Edit.Windows.dll (primary)Syncfusion.Tools.Windows.dllSyncfusion.Shared.Base.dllThe EditControl provides comprehensive code editing features:
📄 Read: references/getting-started.md
When you need to:
📄 Read: references/syntax-highlighting.md
When you need to:
ApplyConfiguration() with KnownLanguages enum📄 Read: references/editing-features.md
When you need to:
📄 Read: references/intellisense.md
When you need to:
📄 Read: references/text-visualization.md
When you need to:
📄 Read: references/file-operations.md
When you need to:
LoadFile()Save() and SaveAs()📄 Read: references/advanced-features.md
When you need to:
C#:
using Syncfusion.Windows.Forms.Edit;
using Syncfusion.Windows.Forms.Edit.Enums;
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
public class CodeEditorForm : Form
{
private EditControl editControl1;
public CodeEditorForm()
{
InitializeComponent();
SetupCodeEditor();
}
private void SetupCodeEditor()
{
// Create EditControl
editControl1 = new EditControl();
// Basic configuration
editControl1.Dock = DockStyle.Fill;
editControl1.BorderStyle = BorderStyle.Fixed3D;
// Apply C# syntax highlighting
editControl1.ApplyConfiguration(KnownLanguages.CSharp);
// Enable line numbers
editControl1.ShowLineNumbers = true;
// Enable code outlining
editControl1.ShowOutliningCollapsers = true;
// Add to form
this.Controls.Add(editControl1);
// Load sample code (optional)
string sampleCode = @"using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(""Hello, World!"");
}
}
}";
editControl1.Text = sampleCode;
}
private void InitializeComponent()
{
this.Text = "C# Code Editor";
this.Size = new Size(800, 600);
}
}
VB.NET:
Imports Syncfusion.Windows.Forms.Edit
Imports Syncfusion.Windows.Forms.Edit.Enums
Imports System
Imports System.Drawing
Imports System.IO
Imports System.Windows.Forms
Public Class CodeEditorForm
Inherits Form
Private editControl1 As EditControl
Public Sub New()
InitializeComponent()
SetupCodeEditor()
End Sub
Private Sub SetupCodeEditor()
' Create EditControl
editControl1 = New EditControl()
' Basic configuration
editControl1.Dock = DockStyle.Fill
editControl1.BorderStyle = BorderStyle.Fixed3D
' Apply C# syntax highlighting
editControl1.ApplyConfiguration(KnownLanguages.CSharp)
' Enable line numbers
editControl1.ShowLineNumbers = True
' Enable code outlining
editControl1.ShowOutliningCollapsers = True
' Add to form
Me.Controls.Add(editControl1)
' Load sample code (optional)
Dim sampleCode As String = "using System;" & vbCrLf & vbCrLf & _
"namespace HelloWorld" & vbCrLf & _
"{" & vbCrLf & _
" class Program" & vbCrLf & _
" {" & vbCrLf & _
" static void Main(string[] args)" & vbCrLf & _
" {" & vbCrLf & _
" Console.WriteLine(""Hello, World!"");" & vbCrLf & _
" }" & vbCrLf & _
" }" & vbCrLf & _
"}"
editControl1.Text = sampleCode
End Sub
Private Sub InitializeComponent()
Me.Text = "C# Code Editor"
Me.Size = New Size(800, 600)
End Sub
End Class
Create an editor that switches between different programming languages:
C#:
private ComboBox languageSelector;
private EditControl editControl1;
private void SetupMultiLanguageEditor()
{
// Language selector
languageSelector = new ComboBox
{
Dock = DockStyle.Top,
DropDownStyle = ComboBoxStyle.DropDownList
};
languageSelector.Items.AddRange(new object[]
{
"C#", "VB.NET", "XML", "HTML", "Java", "SQL", "PowerShell", "JavaScript"
});
languageSelector.SelectedIndex = 0;
languageSelector.SelectedIndexChanged += LanguageSelector_SelectedIndexChanged;
// Editor
editControl1 = new EditControl
{
Dock = DockStyle.Fill,
ShowLineNumbers = true,
ShowOutliningCollapsers = true
};
this.Controls.Add(editControl1);
this.Controls.Add(languageSelector);
// Apply initial language
ApplyLanguage("C#");
}
private void LanguageSelector_SelectedIndexChanged(object sender, EventArgs e)
{
ApplyLanguage(languageSelector.SelectedItem.ToString());
}
private void ApplyLanguage(string language)
{
switch (language)
{
case "C#":
editControl1.ApplyConfiguration(KnownLanguages.CSharp);
break;
case "VB.NET":
editControl1.ApplyConfiguration(KnownLanguages.VB);
break;
case "XML":
editControl1.ApplyConfiguration(KnownLanguages.XML);
break;
case "HTML":
editControl1.ApplyConfiguration(KnownLanguages.HTML);
break;
case "Java":
editControl1.ApplyConfiguration(KnownLanguages.Java);
break;
case "SQL":
editControl1.ApplyConfiguration(KnownLanguages.SQL);
break;
case "PowerShell":
editControl1.ApplyConfiguration(KnownLanguages.PowerShell);
break;
case "JavaScript":
editControl1.ApplyConfiguration(KnownLanguages.JScript);
break;
}
}
Create an editor with file operations:
C#:
private EditControl editControl1;
private string currentFilePath = null;
private void SetupFileEditor()
{
editControl1 = new EditControl
{
Dock = DockStyle.Fill,
ShowLineNumbers = true
};
// Menu bar
MenuStrip menuStrip = new MenuStrip();
ToolStripMenuItem fileMenu = new ToolStripMenuItem("File");
fileMenu.DropDownItems.Add("New", null, NewFile_Click);
fileMenu.DropDownItems.Add("Open...", null, OpenFile_Click);
fileMenu.DropDownItems.Add("Save", null, SaveFile_Click);
fileMenu.DropDownItems.Add("Save As...", null, SaveFileAs_Click);
menuStrip.Items.Add(fileMenu);
this.Controls.Add(editControl1);
this.Controls.Add(menuStrip);
this.MainMenuStrip = menuStrip;
}
private void NewFile_Click(object sender, EventArgs e)
{
editControl1.Text = string.Empty;
currentFilePath = null;
this.Text = "Untitled - Code Editor";
}
private void OpenFile_Click(object sender, EventArgs e)
{
OpenFileDialog openDialog = new OpenFileDialog
{
Filter = "All Files (*.*)|*.*|C# Files (*.cs)|*.cs|VB Files (*.vb)|*.vb"
};
if (openDialog.ShowDialog() == DialogResult.OK)
{
editControl1.LoadFile(openDialog.FileName);
currentFilePath = openDialog.FileName;
this.Text = Path.GetFileName(currentFilePath) + " - Code Editor";
// Auto-detect language based on extension
string ext = Path.GetExtension(currentFilePath).ToLower();
if (ext == ".cs")
editControl1.ApplyConfiguration(KnownLanguages.CSharp);
else if (ext == ".vb")
editControl1.ApplyConfiguration(KnownLanguages.VB);
else if (ext == ".xml")
editControl1.ApplyConfiguration(KnownLanguages.XML);
}
}
private void SaveFile_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(currentFilePath))
{
SaveFileAs_Click(sender, e);
}
else
{
editControl1.SaveFile(currentFilePath);
}
}
private void SaveFileAs_Click(object sender, EventArgs e)
{
SaveFileDialog saveDialog = new SaveFileDialog
{
Filter = "All Files (*.*)|*.*|C# Files (*.cs)|*.cs|VB Files (*.vb)|*.vb"
};
if (saveDialog.ShowDialog() == DialogResult.OK)
{
editControl1.SaveFile(saveDialog.FileName);
currentFilePath = saveDialog.FileName;
this.Text = Path.GetFileName(currentFilePath) + " - Code Editor";
}
}
C#:
editControl1 = new EditControl { Dock = DockStyle.Fill, ShowLineNumbers = true };
editControl1.ApplyConfiguration(KnownLanguages.CSharp);
// Configure IntelliSense suggestions using ContextChoiceController
// Populate suggestions when the context choice opens so they are context-aware
editControl1.ContextChoiceOpen += (s, e) =>
{
var controller = editControl1.ContextChoiceController;
controller.Items.Clear();
controller.Items.Add("Console");
controller.Items.Add("Console.WriteLine");
controller.Items.Add("string");
controller.Items.Add("int");
controller.Items.Add("public");
controller.Items.Add("private");
controller.Items.Add("class");
};
// Configure simple auto-replace (auto-correct) triggers on the editor language
editControl1.Language.AutoReplaceTriggers.Add(new AutoReplaceTrigger("teh", "the"));
editControl1.Language.AutoReplaceTriggers.Add(new AutoReplaceTrigger("cosole", "console"));
editControl1.UseAutoreplaceTriggers = true;
this.Controls.Add(editControl1);
| Property | Type | Description |
|---|---|---|
| Text | string | Gets or sets the text content of the editor |
| ShowLineNumbers | bool | Shows or hides line numbers in the margin |
| ShowOutliningCollapsers | bool | Enables code outlining collapse/expand controls |
| WordWrap | bool | Enables or disables word wrapping |
| ReadOnly | bool | Makes the editor read-only |
| TabSize | int | Sets the number of spaces for tab character |
| AutoCompleteMode | AutoCompleteMode | Configures auto-complete behavior (All, Suggest, None) |
| EnableAutoCorrect | bool | Enables automatic correction of common typos |
| StatusBarSettings | StatusBarSettings | Configures the built-in status bar |
| ContextChoiceOpen | bool | Gets whether IntelliSense context menu is open |
| CanUndo | bool | Indicates if undo operation is available |
| CanRedo | bool | Indicates if redo operation is available |
| IsModified | bool | Indicates if the document has been modified |
| Method | Description |
|---|---|
| ApplyConfiguration(KnownLanguages) | Applies built-in syntax highlighting configuration |
| LoadFile(string) | Loads a file into the editor |
| Save() | Opens the Save dialog (no arguments) |
| SaveFile(string) | Saves the current content to a specified path |
| SaveAs() | Opens the Save As dialog |
| Undo() | Performs undo operation |
| Redo() | Performs redo operation |
| Cut() | Cuts selected text to clipboard |
| Copy() | Copies selected text to clipboard |
| Paste() | Pastes text from clipboard |
| SelectAll() | Selects all text in the editor |
| ShowFindDialog() | Opens the find dialog |
| ShowReplaceDialog() | Opens the replace dialog |
| GoTo(int) | Navigates to specified line number |
| Text (property) | Gets or sets the text content of the editor |
| SaveAsXML(string), SaveAsHTML(string), SaveAsRTF(string) | Export content to XML, HTML, or RTF formats |
| Print() | Opens print dialog for the document |
Start with Getting Started to install and configure the EditControl, then explore specific features through the navigation guide above based on your application requirements.
references/advanced-features.md (opens in a new tab)references/editing-features.md (opens in a new tab)references/file-operations.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/intellisense.md (opens in a new tab)references/syntax-highlighting.md (opens in a new tab)references/text-visualization.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-winformsOther plugins' skills for the same job
113 skills in this plugin
/syncfusion-winforms-ai-assistviewGuide for implementing Syncfusion Windows Forms AI AssistView (SfAIAssistView) for building conversational AI interfaces in desktop applications. Use this when creating chat interfaces, AI assistants, or chatbots with Windows Forms. Supports OpenAI and Azure OpenAI integration, typing indicators, chat suggestions, message bubbles, custom views, input toolbar with attachments, response toolbar actions, and stop responding for interactive messaging experiences./syncfusion-winforms-autocompleteGuides implementation of the Syncfusion WinForms AutoComplete control for text input with auto-suggestion functionality. Use when users want to add autocomplete textboxes, implement auto-suggestion features, create search boxes with suggestions, enable URL/email autocomplete, or build type-ahead search functionality in Windows desktop applications. Covers data binding, customization, filtering, multi-column dropdowns, events, and all AutoComplete-specific features./syncfusion-winforms-autolabelGuides implementation of the Syncfusion WinForms AutoLabel control for automatic label positioning with form controls. Use when users want to add labels that automatically reposition when controls move, create form layouts with paired label-control units, implement complex form designs with FlowLayout, or ensure labels stay synchronized with their associated controls. Covers labeling controls, positioning, spacing, size settings, theming, and events.