Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

syncfusion-winforms-syntax-editorsyncfusion winforms 语法编辑器

Agent Skill

syncfusion-winforms-syntax-editor 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

612

周安装

26

GitHub Stars

公开资料未说明

下载量

214
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-winforms-syntax-editor(syncfusion winforms 语法编辑器)
来源仓库:https://github.com/syncfusion/winforms-ui-components-skills
仓库路径:skills/syncfusion-winforms-syntax-editor
安装命令:
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-syntax-editor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-syntax-editor

简介

Syncfusion WinForms 语法编辑器控件,内置代码高亮、缩进、括号匹配等编程辅助功能。

  • 适用于 IDE 插件、脚本编辑器、配置文件管理等需要语法感知的场景。
  • 支持多种编程语言、主题配色、自动补全及错误行标记。
  • 使用前请核实 Syncfusion 版本是否包含此编辑器内核,并检查对 Unicode 的支持程度。
  • 注意大文件加载时的性能表现,建议采用分块解析或语法树缓存优化响应速度。

SKILL.md

Implementing Syntax Editors (EditControl)

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.

When to Use This Skill

Use this skill when you need to:

  • Create a code editor application with syntax highlighting for popular languages
  • Build a text editor with Visual Studio-like editing features
  • Implement syntax-aware code editing with IntelliSense support
  • Add code outlining and folding capabilities to text editors
  • Create custom language configurations for specialized syntax highlighting
  • Build source code viewers or editors for multiple programming languages
  • Implement advanced text editing with clipboard operations and undo/redo
  • Add find and replace dialogs to text editing applications
  • Create split-view code editors for viewing multiple sections simultaneously
  • Export or print code with syntax highlighting preserved
  • Implement auto-completion and auto-correction in text editors
  • Build applications requiring line numbering, bookmarks, and code navigation
  • Create text editors with rectangular block selection like Visual Studio

Component Overview

Control: EditControl Namespace: Syncfusion.Windows.Forms.Edit Assemblies Required:

  • Syncfusion.Edit.Windows.dll (primary)
  • Syncfusion.Tools.Windows.dll
  • Syncfusion.Shared.Base.dll

Key Capabilities

The EditControl provides comprehensive code editing features:

  • Syntax Highlighting: Built-in support for 11 languages (C#, VB.NET, XML, HTML, Java, SQL, PowerShell, JavaScript, VBScript, Delphi, C) plus custom language configuration via XML
  • Editing Features: Clipboard operations, unlimited undo/redo, drag-and-drop, normal and rectangular block selection, change tracking with line modification markers
  • IntelliSense: Auto-complete with predefined data, auto-correct for common typos, context tooltips for collapsed code blocks, custom IntelliSense popup
  • Code Outlining: Expand/collapse code blocks with configurable outlining regions, bracket matching, collapsible sections
  • Text Visualization: Line numbers, word wrap, current line highlighting, content dividers, underline styles (solid/dash/wave/dot), bookmark and custom indicators
  • Navigation: Character, word, line, page, and document-level navigation with extensive API
  • Find & Replace: Built-in dialogs with Visual Studio-like search and replace capabilities
  • File Operations: Create, open, save with encoding support, export to XML/RTF/HTML, print with formatting
  • Advanced Features: Split views for viewing multiple document sections, status bar with line/column/caret tracking, single-line mode for TextBox-like behavior, customizable shortcut keys
  • Globalization: Complete localization support, RTL (right-to-left) text layout
  • Events: Comprehensive event model for document changes, selection, navigation, and user interactions

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

When you need to:

  • Install and reference EditControl assemblies
  • Create EditControl via designer or code
  • Configure basic properties (size, border, dock)
  • Load initial content into the editor
  • Set up a basic code editor application

Syntax Highlighting

📄 Read: references/syntax-highlighting.md

When you need to:

  • Apply built-in syntax highlighting for C#, VB.NET, XML, HTML, Java, SQL, PowerShell, JavaScript, etc.
  • Use ApplyConfiguration() with KnownLanguages enum
  • Create custom language configurations using XML
  • Define lexems, formats, and code coloring rules
  • Configure language-specific syntax elements
  • Handle multiple language types in one application

Editing Features

📄 Read: references/editing-features.md

When you need to:

  • Implement clipboard operations (Cut, Copy, Paste)
  • Configure unlimited undo/redo functionality
  • Enable normal or rectangular block selection modes
  • Support drag-and-drop text editing
  • Add block indent and outdent capabilities
  • Display line modification markers for change tracking
  • Customize the context menu for editing operations

IntelliSense Features

📄 Read: references/intellisense.md

When you need to:

  • Configure auto-complete with predefined data sources
  • Enable auto-correct for common typos and misspellings
  • Display context tooltips for collapsed code
  • Create custom IntelliSense popups
  • Handle IntelliSense events and user interactions
  • Customize IntelliSense item appearance and behavior

Text Visualization

📄 Read: references/text-visualization.md

When you need to:

  • Display line numbers with customization
  • Enable code outlining and folding
  • Configure word wrap behavior
  • Highlight the current line with custom colors
  • Add content dividers between sections
  • Apply underline styles (solid, dash, wave, dot)
  • Create bookmarks and custom indicators
  • Navigate between bookmarks

File Operations and Export

📄 Read: references/file-operations.md

When you need to:

  • Create new documents programmatically
  • Open and load files with LoadFile()
  • Save documents with Save() and SaveAs()
  • Handle file encoding (UTF-8, Unicode, ASCII)
  • Export content to XML, RTF, or HTML formats
  • Print documents with syntax highlighting
  • Configure print settings and page setup

Advanced Features

📄 Read: references/advanced-features.md

When you need to:

  • Create split views for viewing multiple document sections
  • Configure and customize the status bar
  • Use single-line mode for TextBox-like behavior
  • Implement find and replace dialogs
  • Use text navigation methods programmatically
  • Customize shortcut key bindings
  • Enable RTL (right-to-left) support
  • Localize the editor to different languages
  • Handle comprehensive event model
  • Optimize scrolling behavior for large files

Quick Start Example

Basic Code Editor with C# Syntax Highlighting

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

Common Patterns

Pattern 1: Multi-Language Code Editor

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;
    }
}

Pattern 2: File Editor with Save/Load

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";
    }
}

Pattern 3: Code Editor with IntelliSense

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);

Key Properties and Methods

Essential Properties

PropertyTypeDescription
TextstringGets or sets the text content of the editor
ShowLineNumbersboolShows or hides line numbers in the margin
ShowOutliningCollapsersboolEnables code outlining collapse/expand controls
WordWrapboolEnables or disables word wrapping
ReadOnlyboolMakes the editor read-only
TabSizeintSets the number of spaces for tab character
AutoCompleteModeAutoCompleteModeConfigures auto-complete behavior (All, Suggest, None)
EnableAutoCorrectboolEnables automatic correction of common typos
StatusBarSettingsStatusBarSettingsConfigures the built-in status bar
ContextChoiceOpenboolGets whether IntelliSense context menu is open
CanUndoboolIndicates if undo operation is available
CanRedoboolIndicates if redo operation is available
IsModifiedboolIndicates if the document has been modified

Key Methods

MethodDescription
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

Common Use Cases

  1. Source Code Editor: Build Visual Studio-like code editors for C#, VB.NET, Java with syntax highlighting and IntelliSense
  2. Configuration File Editor: XML, JSON editors with syntax validation
  3. SQL Query Editor: Database query editors with SQL syntax highlighting
  4. Script Editor: PowerShell, JavaScript editors for automation
  5. Code Snippet Manager: Store and organize code snippets with syntax highlighting
  6. Log File Viewer: View structured logs with syntax highlighting
  7. Multi-Language IDE: Build IDEs supporting multiple languages with split views

Next Steps

Start with Getting Started to install and configure the EditControl, then explore specific features through the navigation guide above based on your application requirements.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.67%
按下载量换算72

Claude

32.19%
按下载量换算69

Cursor

18.08%
按下载量换算39

Gemini CLI

8.45%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills