SyntaxEditor is a syntax-highlighting code editor control that allows you to bring a Visual Studio-like code editing experience into your own applications. You'll find a wealth of editing and visualization features right out of the box.
Highlighting styles can be completely customized by the end user for each code language, even allowing the changing of text area background and line number margin colors.
SyntaxEditor has all the advanced editing capabilities you'd expect to find in a premium code editor, such as:
Over 100 edit actions are included with SyntaxEditor that cover everything from basic caret movement and selection to features such as tabification, character/word/line transposition, etc.
The completion list popup is used to display a number of code completion options to the end user, not only providing intelligent information about the code being edited, but also improving the productivity of the end user by supporting "Ctrl+Space" functionality.
Completion lists support a powerful filtering mechanism that can display tabs and/or buttons to show/hide items that meet certain criteria. They include numerous matching algorithm options, including some that allow you to make matches just by typing any characters in the item text. Custom matching algorithms can be developed, and the completion list auto-highlights matched text. Description tips show more information about items via the use of rich formatted content.
IntelliPrompt parameter info displays helpful popup hints about an invocation that is being typed, and its parameters. Multiple invocation overloads can be displayed in a single popup, using arrow keys to toggle between them. They support any type of content, however the most appealing way to add content is to use our mini-HTML markup language that applies rich formatting to the displayed text.
Quick info tips can be used to give more information about what is at the current caret location or under the mouse. Just like parameter info, they support any type of content including our special markup language.
IntelliPrompt code snippets provide a way to insert pre-defined fragments of text into the editor. A popup mechanism is included for selecting from available code snippets.
Each code snippet can declare multiple fields of text, and when a code snippet template session is activated in SyntaxEditor, the text is inserted and the end user can tab between the fields to edit their values.
Any code snippets designed for Visual Studio can be loaded into SyntaxEditor since the file formats are the same.
A NavigableSymbolSelector control is included that provides two side-by-side drop-downs similar to the type/member drop-downs above the code editor in Visual Studio. One drop-down shows all available root symbols (generally types), and the other shows all available member symbols within the currently selected root symbol.
As the caret in a bound SyntaxEditor instance is moved, the selections in the NavigableSymbolSelector update to indicate the enclosing symbols (types/members). The end user can also select a different symbol from the drop-downs to navigate directly to the related symbol declaration.
SyntaxEditor has complete support for code outlining, also known as code folding. Syntax languages can automatically choose where to create outlining nodes (based on tokens, AST's, etc.) or the end user can choose to create outlining nodes via selected text. When a node is collapsed, a customizable text adornment denotes where the collapsed node is. Hover the mouse over the adornment to see the collapsed node's text.
Certain nodes such as #region nodes can be marked to collapse by default, or marked so that they auto-collapse when Collapse to Definitions is used. The outlining margin renders the outlining node hierarchy and allows for easy toggling of outlining node expansion. Hover over expanded nodes in the outlining margin to see a highlight indicating the node's line range.
SyntaxEditor supports a single-line mode that renders 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.
A powerful adornment layer system allows for any sort of custom UI elements (images, shapes, and even controls) to be added anywhere within the text area. Animation is fully supported. Adornment layers can be set to appear before or after built-in layers, such as behind the selection, etc. Easily add squiggle lines, background highlights, or any other decoration to text.
A special kind of adornments called intra-text adornments embed themselves in-line with the text by reserving space and the text formatter adjusts the surrounding text to flow around the reserved space where the adornments render.
Indicators are special 'tagged' regions of text that display a glyph in the indicator margin and optionally highlight the text range with special styles. Text range-based indicators (like breakpoints) flow and resize with text as edits are made to the document. Line-based indicators (like bookmarks) apply to and track a single document line.
Built-in bookmark, breakpoint, and current statement indicators are included. Custom indicators can be easily created as well.
While the SyntaxEditor editor views have numerous built-in margins (line number, outlining, ruler, etc.), SyntaxEditor offers an extensibility point where custom margins can be created and added to editor views in any location.
All of the standard find/replace options are available, such as match case, match whole word, search up, multiple search pattern providers (regular expressions, etc.), scope options, etc. Regular expression searches return captures and support substitutions.
Search pattern providers describe the format in which find and replace text can be entered when doing searches. SyntaxEditor includes normal, regular expression, wildcard, acronym, and shorthand providers but it's easy for you to build your own custom ones as well.
An EditorSearchView control is included that implements a complete find/replace user interface, similar to the one found in Visual Studio. It features stylish animations when making mode changes and showing/hiding options and can be embedded in a tool window from our Docking & MDI product.
SyntaxEditor supports incremental search, which is a feature that allows for fast text searching via the keyboard, and without the use of any search dialogs or panes.
When performing searches, SyntaxEditor can actively highlight matching results as the user types the find text.
The display of various Print and Print Preview dialogs is as easy as a simple method call. SyntaxEditor includes a number of settings that affect printouts only, and not the editor views.
Built-in margins include document title, line number, word wrap glyph, and page number margins. It's easy to create a custom margin and insert it anywhere in a printed page.