TextControlBox.WinUI.JuliusKirsch 1.1.4

dotnet add package TextControlBox.WinUI.JuliusKirsch --version 1.1.4                
NuGet\Install-Package TextControlBox.WinUI.JuliusKirsch -Version 1.1.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TextControlBox.WinUI.JuliusKirsch" Version="1.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TextControlBox.WinUI.JuliusKirsch --version 1.1.4                
#r "nuget: TextControlBox.WinUI.JuliusKirsch, 1.1.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TextControlBox.WinUI.JuliusKirsch as a Cake Addin
#addin nuget:?package=TextControlBox.WinUI.JuliusKirsch&version=1.1.4

// Install TextControlBox.WinUI.JuliusKirsch as a Cake Tool
#tool nuget:?package=TextControlBox.WinUI.JuliusKirsch&version=1.1.4                

<div align="center"> <img src="images/Icon1.png" height="150px" width="auto"> <h1>TextControlBox-WinUI</h1> </div>

<div align="center"> <img src="https://img.shields.io/github/issues/FrozenAssassine/TextControlBox-WinUI.svg?style=flat"> <img src="https://img.shields.io/github/stars/FrozenAssassine/TextControlBox-WinUI.svg?style=flat"> <img src="https://img.shields.io/github/repo-size/FrozenAssassine/TextControlBox-WinUI?style=flat">

</div>

<br/>

๐Ÿค” What is TextControlBox?

TextControlBox is a powerful and highly customizable textbox control for WinUI 3 applications. It provides an advanced text editing experience with features like syntax highlighting for multiple programming languages, intuitive search and replace functionality, zooming, line numbering, and smooth scrolling. With support for undo/redo, customizable themes, and efficient performance.

๐Ÿ› ๏ธ Features

  • Basic Text Editing: Cut, copy, paste, undo, redo, and full text selection capabilities.
  • Navigation & Selection:
    • Go to a specific line.
    • Select specific lines or the entire text.
  • Scrolling & Zooming:
    • Scroll to specific lines or pages.
    • Zoom in and out for better readability.
  • Syntax Highlighting:
    • Built-in support for multiple programming languages.
    • Easily toggle syntax highlighting on and off.
  • Search & Replace:
    • Multi highlight search
    • Find and replace text with options for case sensitivity and whole-word matching.
  • Customization Options:
    • Show or hide line numbers.
    • Customize font, theme, and cursor appearance.
    • Configure spaces vs. tabs for indentation.
  • Other Features:
    • Drag & drop text support.
    • Surround selected text with custom characters.
    • Get cursor position and manage selections programmatically.

โค๏ธ Support my work

<a href='https://ko-fi.com/K3K819KSLG' target='_blank'>
<img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi6.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /> </a>

๐Ÿ—๏ธ Getting Started

Installation

๐Ÿ“ฅ Download Nuget.org

Add TextControlBox to your WinUI 3 project and include the necessary namespace in your XAML or C# file.

using TextControlBoxNS;

Basic Usage

TextControlBox textBox = new TextControlBox();
textBox.LoadText("Hello, world!");
textBox.ShowLineNumbers = true;
textBox.EnableSyntaxHighlighting = true;

๐Ÿš€ Events

TextControlBox provides several events to handle user interactions:

  • TextChanged: Triggered when the text content changes.
  • SelectionChanged: Fires when the user changes the selected text.
  • ZoomChanged: Called when the zoom factor is adjusted.
  • GotFocus / LostFocus: Handle focus changes.

๐ŸŽจ Syntax Highlighting

TextControlBox includes built-in support for multiple languages:

  • C#, C++, Java, Python, JavaScript, JSON, HTML, CSS, SQL, Markdown, Batch, Config, CSV, LaTex, PHP, QSharp, TOML, XML

Enable syntax highlighting:

textBox.SelectSyntaxHighlightingById(SyntaxHighlightID.CSharp);

๐Ÿ”Ž Search & Replace

Start a search:

textBox.BeginSearch("example", wholeWord: false, matchCase: true);

Replace occurrences:

textBox.ReplaceAll("oldText", "newText", matchCase: true, wholeWord: false);

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing

Contributions are welcome! Feel free to submit a pull request or open an issue.

๐Ÿงพ License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows10.0.19041 is compatible.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on TextControlBox.WinUI.JuliusKirsch:

Repository Stars
kyoyama-kazusa/Sudoku
A sudoku solver using brute forces and logical techniques.
Version Downloads Last updated
1.1.4 136 3/17/2025
1.1.3 112 3/14/2025
1.1.2 150 3/11/2025
1.1.1 159 3/3/2025
1.1.0-alpha.3 65 2/28/2025
1.1.0-alpha.2 79 2/22/2025
1.1.0-alpha 116 2/10/2025
1.0.0 304 8/1/2023

Fixed line numbers not updating properly some times
Fixed index out of range exception when deleting triple clicked lines
Fixed undo redo for new line with selection
Fixed undo adding additional line for delete last line of text