# SA.CodeView **Repository Path**: TieScript/SA.CodeView ## Basic Information - **Project Name**: SA.CodeView - **Description**: No description available - **Primary Language**: C# - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-27 - **Last Updated**: 2025-12-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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](https://github.com/ygavrishov/SA.CodeView/blob/master/Screenshots/find-window.png) * **Current line highlighting**. Turn on HighlightCurrentLine property. ![Current line highlighting](https://github.com/ygavrishov/SA.CodeView/blob/master/Screenshots/current-line-highlihting.png) * **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: ```csharp codeViewer.Text = "Span sample"; codeViewer.Spans.Add(Brushes.LightGreen, 0, 2, 7); ``` ![Spans sample](https://github.com/ygavrishov/SA.CodeView/blob/master/Screenshots/spans-sample.png) * **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: ```csharp codeViewer.Language = PredefinedLanguage.MsSql; ``` ![Syntax highlighting](https://github.com/ygavrishov/SA.CodeView/blob/master/Screenshots/syntax-highlighting.png) or implement your own implementation.