Windows Forms Syntax Editor Overview

8 Jul 20263 minutes to read

The EditControl is a powerful text-editor control for creating interactive code-editor applications with a rich feature set. It includes editing, syntax highlighting, text indentation, IntelliSense, expand/collapse of code blocks, and custom language configuration similar to the Microsoft Visual Studio Editor.

Key features

Syntax highlighting - Provides built-in syntax highlighting and a code-editing experience for popular languages such as C, C#, Delphi, VB, SQL, XML, HTML, Java, VBScript, JScript, PowerShell, and plain text. It also offers fully configurable syntax highlighting for general text editing.

Custom language support - Supports user-defined language configurations. Custom language configurations can be created easily and applied to the content of the EditControl.

Editing support - Allows end users to modify and edit text documents and source-code files. This includes clipboard support, unlimited undo and redo, drag and drop, block indent and outdent, and more.

Code outlining - Sections of code in the outlining blocks can be specified using configuration settings. The EditControl defines different brackets for highlighting different languages.

Clipboard operations - Provides keyboard and programmatic support to Cut, Copy, and Paste.

Selection mode - Supports normal selection and rectangular block selection to select lines from specific columns, like the Microsoft Visual Studio text editor.

Change tracking - Provides extensive support to track the changed lines by displaying markers at the beginning of lines after the last file save operation.

Line number - Supports displaying line numbers at the start of the text.

Indentation support - Supports text indent and outdent options like the Microsoft Visual Studio text editor.

Word wrap - Supports wrapping text to the next line when it exceeds the control bounds.

Auto complete - Supports an AutoComplete option that predicts and appends the predefined data as the user types.

Auto correct - Supports an AutoCorrect option that automatically corrects misspellings and common typos.

Fully functional context menu - Provides a built-in context menu with options to perform editing operations such as Undo, Redo, Cut, Copy, Paste, Select All, and more. The EditControl also contains options to enable or disable the built-in context menu.

Content dividers - Clearly distinguishes content sections with line dividers similar to Visual Basic to improve code readability.

IntelliSense - Provides IntelliSense pop-up capabilities to add content easily, like in the Microsoft Visual Studio code editor.

ToolTip - Provides interactive tooltip support that is built-in and appears automatically when the pointer is placed over a collapsed block of text.

Highlight line - Supports highlighting the current line with a customizable background color.

Underline - Provides support for formatting text by underlining with various built-in options such as solid, dash, wave, and dotted lines.

Text navigation - Provides extensive support for text navigation based on character, word, line, page, or entire document levels.

Bookmark and custom indicators - Supports Microsoft Visual Studio text editor-style bookmarks and custom indicators.

Search or Replace dialog - Provides built-in Find and Replace dialog windows to search and highlight the desired text and replace it, as in the Microsoft Visual Studio text editor.

Status bar - Provides a built-in status bar at the bottom of the control with different panels that display essential information. It helps to track line, column number, caret index, and more.

Shortcut keys - Provides shortcut key support for all editing and navigation operations.

Split view - Provides a view-splitting function to split a single document in the EditControl into several views.

Single line mode - Supports single-line mode that is rendered just like a regular TextBox. This enables you to have a simple TextBox but with all the syntax highlighting, selection, IntelliPrompt, and other features that make SyntaxEditor great for editing code.

File support - Supports file operations like Create New, Open, and Save.

Globalization and localization - Supports complete localization of all the dialogs and pre-defined text to any desired language.

Right to left - Supports laying out text in a right-to-left fashion, which allows the control to develop forms for worldwide audiences.

Print - Supports a Print option to print the loaded contents.

Export - Supports exporting contents to XML, RTF, and HTML formats.

Scrolling - Provides extremely smooth scrolling behavior even when large files are loaded in the EditControl.