{"id":19945626,"url":"https://github.com/frozenassassine/textcontrolbox-winui","last_synced_at":"2025-07-20T17:04:17.314Z","repository":{"id":185153034,"uuid":"673083591","full_name":"FrozenAssassine/TextControlBox-WinUI","owner":"FrozenAssassine","description":"Winui3 textbox with syntax highlighting, line numbering and much more","archived":false,"fork":false,"pushed_at":"2025-07-14T06:46:47.000Z","size":665,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T09:39:21.858Z","etag":null,"topics":["csharp","syntaxhighlighting","textbox","textcontrolbox","winui3"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FrozenAssassine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-31T20:45:48.000Z","updated_at":"2025-05-29T07:05:38.000Z","dependencies_parsed_at":"2023-11-28T22:31:25.491Z","dependency_job_id":"487b02e5-28de-4735-864c-7812fc769d23","html_url":"https://github.com/FrozenAssassine/TextControlBox-WinUI","commit_stats":null,"previous_names":["frozenassassine/textcontrolbox-winui"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/FrozenAssassine/TextControlBox-WinUI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FTextControlBox-WinUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FTextControlBox-WinUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FTextControlBox-WinUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FTextControlBox-WinUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrozenAssassine","download_url":"https://codeload.github.com/FrozenAssassine/TextControlBox-WinUI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FTextControlBox-WinUI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266161900,"owners_count":23885927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","syntaxhighlighting","textbox","textcontrolbox","winui3"],"created_at":"2024-11-13T00:26:15.300Z","updated_at":"2025-07-20T17:04:17.294Z","avatar_url":"https://github.com/FrozenAssassine.png","language":"C#","funding_links":["https://ko-fi.com/K3K819KSLG'"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"images/Icon1.png\" height=\"150px\" width=\"auto\"\u003e\n\u003ch1\u003eTextControlBox-WinUI\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/github/issues/FrozenAssassine/TextControlBox-WinUI.svg?style=flat\"\u003e\n\u003cimg src=\"https://img.shields.io/github/stars/FrozenAssassine/TextControlBox-WinUI.svg?style=flat\"\u003e\n\u003cimg src=\"https://img.shields.io/github/repo-size/FrozenAssassine/TextControlBox-WinUI?style=flat\"\u003e\n\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n## 🤔 What is TextControlBox?\nTextControlBox 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.\n\n## 🛠️ Features\n\n- **Basic Text Editing**: Cut, copy, paste, undo, redo, and full text selection capabilities.\n- **Navigation \u0026 Selection**:\n  - Go to a specific line.\n  - Select specific lines or the entire text.\n- **Scrolling \u0026 Zooming**:\n  - Scroll to specific lines or pages.\n  - Zoom in and out for better readability.\n- **Syntax Highlighting**:\n  - Built-in support for multiple programming languages.\n  - Easily toggle syntax highlighting on and off.\n- **Search \u0026 Replace**:\n  - Multi highlight search\n  - Find and replace text with options for case sensitivity and whole-word matching.\n- **Customization Options**:\n  - Show or hide line numbers.\n  - Customize font, theme, and cursor appearance.\n  - Configure spaces vs. tabs for indentation.\n- **Other Features**:\n  - Drag \u0026 drop text support.\n  - Surround selected text with custom characters.\n  - Get cursor position and manage selections programmatically.\n\n## ❤️ Support my work  \n\u003ca href='https://ko-fi.com/K3K819KSLG' target='_blank'\u003e  \n    \u003cimg 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' /\u003e\n\u003c/a\u003e\n\n## 🏗️ Getting Started\n\n### Installation\n### 📥 [Download Nuget.org](https://www.nuget.org/packages/TextControlBox.WinUI.JuliusKirsch/1.1.0-alpha)\n\nAdd TextControlBox to your WinUI 3 project and include the necessary namespace in your XAML or C# file.\n\n```csharp\nusing TextControlBoxNS;\n```\n\n### Basic Usage\n\n```csharp\nTextControlBox textBox = new TextControlBox();\ntextBox.LoadText(\"Hello, world!\");\ntextBox.ShowLineNumbers = true;\ntextBox.EnableSyntaxHighlighting = true;\n```\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003ch2\u003e🛠️ All properties and functions\u003c/h2\u003e\u003c/summary\u003e\n\n- `Text`: Gets or sets the full content of the editor.\n- `SelectedText`: Gets the currently selected text.\n- `CurrentSelection`, `CurrentSelectionOrdered`: Provides selection metadata.\n- `HasSelection`: Indicates if any text is currently selected.\n- `CursorPosition`: Gets the current cursor position.\n- `CurrentLineIndex`: Index of the line containing the cursor.\n- `NumberOfLines`: Total number of lines in the editor.\n- `FontFamily`: Gets or sets the font family.\n- `FontSize`: Gets or sets the base font size.\n- `RenderedFontSize`: Gets the final rendered font size.\n- `CornerRadius`: Gets or sets the control's corner radius.\n- `RequestedTheme`: Gets or sets the UI theme.\n- `Design`: Gets or sets visual settings like line numbers and highlighting.\n- `ShowLineNumbers`: Toggles line number visibility.\n- `ShowLineHighlighter`: Toggles current line highlighting.\n- `EnableSyntaxHighlighting`: Enables or disables syntax highlighting.\n- `SyntaxHighlighting`: Gets or sets the current syntax highlighting language.\n- `LineEnding`: Gets or sets the line ending mode.\n- `SpaceBetweenLineNumberAndText`: Spacing between line numbers and text.\n- `ZoomFactor`: Gets or sets the zoom factor.\n- `VerticalScroll`, `HorizontalScroll`: Gets or sets scroll offsets.\n- `VerticalScrollSensitivity`, `HorizontalScrollSensitivity`: Adjust scroll speed.\n- `UseSpacesInsteadTabs`: Enables space-based tabulation.\n- `NumberOfSpacesForTab`: Sets number of spaces per tab.\n- `SearchIsOpen`: Indicates whether the search panel is open.\n- `Lines`: Gets all lines as strings.\n- `DoAutoPairing`: Enables auto-pairing of brackets/quotes.\n- `ControlW_SelectWord`: Enables Ctrl+W to select the current word.\n- `CanDragDropText`: Enables drag-and-drop support.\n- `ContextFlyout`: Gets or sets the context menu flyout.\n- `ContextFlyoutDisabled`: Disables the context menu.\n- `IsReadonly`: Determines if the control is read-only.\n- `CursorSize`: Gets or sets the cursor size.\n- `Focus(FocusState state)`: Sets focus to the control.\n- `SelectLine(int line)`: Selects a specific line.\n- `SelectLines(int start, int count)`: Selects a range of lines.\n- `GoToLine(int line)`: Moves the cursor to a specific line.\n- `LoadText(string text)`: Loads text into the control.\n- `SetText(string text)`: Sets the text content.\n- `LoadLines(IEnumerable\u003cstring\u003e lines, LineEnding lineEnding = LineEnding.CRLF)`: Loads multiple lines.\n- `Paste()`: Pastes clipboard content.\n- `Copy()`: Copies the selection to clipboard.\n- `Cut()`: Cuts the selected text.\n- `GetText()`: Returns the current content.\n- `SetSelection(int start, int length)`: Selects a specific text range.\n- `SelectAll()`: Selects all text.\n- `ClearSelection()`: Clears any text selection.\n- `Undo()`: Undoes the last action.\n- `Redo()`: Redoes the last undone action.\n- `ScrollLineToCenter(int line)`: Scrolls a line to center.\n- `ScrollOneLineUp()`, `ScrollOneLineDown()`: Scrolls one line vertically.\n- `ScrollLineIntoView(int line)`: Brings a line into view.\n- `ScrollTopIntoView()`, `ScrollBottomIntoView()`: Scrolls to top/bottom.\n- `ScrollPageUp()`, `ScrollPageDown()`: Scrolls a full page.\n- `ScrollIntoViewHorizontally()`: Scrolls horizontally into view.\n- `GetLineText(int line)`: Returns the text of a line.\n- `GetLinesText(int startLine, int length)`: Returns a range of lines.\n- `SetLineText(int line, string text)`: Replaces the text of a line.\n- `DeleteLine(int line)`: Deletes a specific line.\n- `AddLine(int line, string text)`: Adds a new line at a position.\n- `SurroundSelectionWith(string text)`: Surrounds selection with a string.\n- `SurroundSelectionWith(string text1, string text2)`: Surrounds with prefix/suffix.\n- `DuplicateLine(int line)`: Duplicates the specified line.\n- `DuplicateCurrentLine()`: Duplicates the current line.\n- `ReplaceAll(string word, string replaceWord, bool matchCase, bool wholeWord)`: Replaces all matches.\n- `ReplaceNext(string replaceWord)`: Replaces the next match.\n- `FindNext()`, `FindPrevious()`: Navigates search results.\n- `BeginSearch(string word, bool wholeWord, bool matchCase)`: Starts a search.\n- `EndSearch()`: Ends the search.\n- `Unload()`: Unloads the control.\n- `ClearUndoRedoHistory()`: Clears undo/redo history.\n- `GetCursorPosition()`: Returns the cursor's screen position.\n- `SetCursorPosition(int lineNumber, int characterPos, bool scrollIntoView = true, bool autoClamp = true)`: Sets the cursor position.\n- `SelectSyntaxHighlightingById(SyntaxHighlightID languageId)`: Sets highlighting by ID.\n- `CalculateSelectionPosition()`: Gets position info for selection.\n- `CharacterCount()`: Returns character count.\n- `WordCount()`: Returns word count.\n- `TextChanged`: Event triggered when text changes.\n- `SelectionChanged`: Event triggered on selection change.\n- `ZoomChanged`: Event triggered when zoom changes.\n- `GotFocus`, `LostFocus`, `Loaded`: Focus and lifecycle events.\n- `SyntaxHighlightings`: Static dictionary of syntax languages.\n- `GetSyntaxHighlightingFromID(SyntaxHighlightID languageId)`: Gets highlighting language.\n- `GetSyntaxHighlightingFromJson(string json)`: Loads highlighting from JSON.\n\u003c/details\u003e\n\n## 🚀 Events\n\nTextControlBox provides several events to handle user interactions:\n\n- `TextChanged`: Triggered when the text content changes.\n- `SelectionChanged`: Fires when the user changes the selected text.\n- `ZoomChanged`: Called when the zoom factor is adjusted.\n- `GotFocus` / `LostFocus`: Handle focus changes.\n\n## 🎨 Syntax Highlighting\n\nTextControlBox includes built-in support for multiple languages:\n\n- C#, C++, Java, Python, JavaScript, JSON, HTML, CSS, SQL, Markdown, Batch, Config, CSV, LaTex, PHP, QSharp, TOML, XML\n\nEnable syntax highlighting:\n\n```csharp\ntextBox.SelectSyntaxHighlightingById(SyntaxHighlightID.CSharp);\n```\n\n## 👨‍👩‍👧‍👦 Contributing\n\nContributions are welcome! Feel free to submit a pull request or open an issue.\n\n## 🧾 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozenassassine%2Ftextcontrolbox-winui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrozenassassine%2Ftextcontrolbox-winui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozenassassine%2Ftextcontrolbox-winui/lists"}