Skip to content

RellikJaeger/SA.CodeView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SA.CodeView

C# WinForms code editor with syntax highlighting

SA.CodeView is light-weight viewer and editor with syntax highlighting. It can be used as single-line text field or as fully functioned editor. It was initially developed for some application but then was segregated as standalone open-source library.

Quick Start

  • Download the sources and compile SA.CodeView.dll library.
  • Create new Windows Forms project and open Form1.cs designer view.
  • Toolbox panel -> right click -> Choose Items... -> Browse. CodeViewer control should appear.
  • Drag and drop CodeViewer into the form.
  • Specify Language property, compile the project.

Features

  • Line Numbers. Just Set ShowLineNumbers = true.
  • "Find Text" window. Invoke ShowFind() method from your code.

ShowFind window

  • Current line highlighting. Turn on HighlightCurrentLine property.

Current line highlighting

  • Ability to change background and border for some text fragments. Spans can be used for this purpose. The span is part of the text with specified background and border color. Add items to Spans collection to use this feature:
	codeViewer.Text = "Span sample";
	codeViewer.Spans.Add(Brushes.LightGreen, 0, 2, 7);

Spans sample

  • Syntax highlighting. SA.CodeView has expandable system of different languages support. It also supports predefined support of XML and different dialects of SQL. To enable syntax highlighting select on of predefined languages:
	codeViewer.Language = PredefinedLanguage.MsSql;

Syntax highlighting

or implement your own implementation.

About

C# WinForms code editor with syntax highlighting

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PLpgSQL 66.1%
  • C# 33.9%