{"id":13638856,"url":"https://github.com/BreeceW/WinUIEdit","last_synced_at":"2025-04-19T21:35:09.716Z","repository":{"id":65410047,"uuid":"450282202","full_name":"BreeceW/WinUIEdit","owner":"BreeceW","description":"Code editor control for UWP and WinUI 3 based on Scintilla","archived":false,"fork":false,"pushed_at":"2024-03-14T11:31:14.000Z","size":4253,"stargazers_count":124,"open_issues_count":7,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-29T09:51:25.101Z","etag":null,"topics":["code-editor","cpp","csharp","scintilla","uwp","wasdk","winappsdk","windows","windows-10","windows-11","windows-app-sdk","winui","winui3","xaml"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BreeceW.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeBuild.props","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-01-20T22:49:12.000Z","updated_at":"2024-10-25T20:22:06.000Z","dependencies_parsed_at":"2024-06-11T17:09:03.891Z","dependency_job_id":null,"html_url":"https://github.com/BreeceW/WinUIEdit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreeceW%2FWinUIEdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreeceW%2FWinUIEdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreeceW%2FWinUIEdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreeceW%2FWinUIEdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BreeceW","download_url":"https://codeload.github.com/BreeceW/WinUIEdit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223394398,"owners_count":17138537,"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":["code-editor","cpp","csharp","scintilla","uwp","wasdk","winappsdk","windows","windows-10","windows-11","windows-app-sdk","winui","winui3","xaml"],"created_at":"2024-08-02T01:00:54.654Z","updated_at":"2024-11-09T09:30:22.649Z","avatar_url":"https://github.com/BreeceW.png","language":"C++","funding_links":[],"categories":["✏️ Text/Code Editors/Office apps"],"sub_categories":[],"readme":"# WinUIEdit\r\n[![WinUI 3 NuGet version](https://img.shields.io/nuget/v/WinUIEdit?label=nuget%20(WinUI%203))](https://www.nuget.org/packages/WinUIEdit)\r\n[![UWP NuGet version](https://img.shields.io/nuget/v/WinUIEdit.Uwp?label=nuget%20(UWP))](https://www.nuget.org/packages/WinUIEdit.Uwp)\r\n\r\nThis is an early work-in-progress code editor control for both UWP and WinUI 3. It is a port of the [Scintilla editor component](https://www.scintilla.org). It is written in C++ and works with C#, C++, and any other WinRT-compatible language.\r\n\r\n\u003e [!NOTE]\r\n\u003e This control is currently not production ready. Breaking API changes are very likely at this stage.\r\n\r\n## Quick start\r\nInstall either the [WinUIEdit](https://www.nuget.org/packages/WinUIEdit) NuGet package if using WinUI 3 or the [WinUIEdit.Uwp](https://www.nuget.org/packages/WinUIEdit.Uwp) NuGet package if using UWP (WinUI 2).\r\n\r\nAdd the namespace and code editor control to your page as shown below:\r\n\r\n```xml\r\n\u003cPage\r\n    xmlns:editor=\"using:WinUIEditor\"\u003e\r\n    \u003ceditor:CodeEditorControl x:Name=\"MyEditor\" HighlightingLanguage=\"csharp\" /\u003e\r\n\u003c/Page\u003e\r\n```\r\n\r\nSyntax highlighting is available through the `HighlightingLanguage` property. To control the editor, use the `Editor` property. For example, to set the editor text:\r\n```csharp\r\nMyEditor.Editor.SetText(\"Vintage tee, brand new phone\");\r\n```\r\nSee the [Scintilla documentation](https://www.scintilla.org/ScintillaDoc.html) for complete remarks on all methods.\r\n\r\nIf using C++/WinRT, add `#include \u003cwinrt/WinUIEditor.h\u003e` to your `pch.h` file.\r\n\r\n## Demo\r\nYou can download a demo from Microsoft Store [here](https://apps.microsoft.com/detail/9PGZBDP9PSPF?cid=github\u0026launch=true). Expect some occasional glitches and incomplete features.\r\n\r\n\u003cimg alt=\"Mica Editor: replica of Windows 11 Notepad with WinUIEdit control using syntax highlighting, line numbers, and mica, demoing C++ sample code\" src=\"https://user-images.githubusercontent.com/18747724/213900470-3c57b252-3488-40d1-b708-f392a30aab2f.png\" width=\"500\" /\u003e\r\n\r\n## Advanced usage\r\n`CodeEditorControl` wraps `EditorBaseControl` and includes additional features and changes default settings and styles. `EditorBaseControl` can be used directly if only the original Scintilla control is desired. The Scintilla API is available through a WinRT wrapper exposed by the `Editor` property, as well as the original window message-based API via the `SendMessage` method.\r\n\r\n## Windows version support\r\nThe WinUI 3 version of this control should work on Windows 10, version 1809 and later and support ARM64, x64, and x86. The UWP version of this control should work on Windows 10, version 1703 and later. It will run on ARM64, ARM32, x64, and x86.\r\n\r\n## Development\r\n\r\n### How to build this project\r\nTo switch the build between WinUI 3 and UWP, you will need to modify [UseWinUI3.txt](https://github.com/BreeceW/WinUIEdit/blob/main/UseWinUI3.txt) to `true` or `false`. To do this quickly, use the [WinUI3](https://github.com/BreeceW/WinUIEdit/tree/main/Tools#winui3) and [Uwp](https://github.com/BreeceW/WinUIEdit/tree/main/Tools#uwp) tools.\r\nOpen WinUIEditor.sln in Visual Studio 2022. Then, set CsDemoUWP or CppDemoUWP as the startup project for UWP or CsDemoWinUI3 or CppDemoWinUI3 for WinUI 3. Now you can build and run the project.\r\n\r\n### Project file structure\r\n|Folder|Description|\r\n|-:|:-|\r\n|**WinUIEditor**|XAML control that hosts the Scintilla port (the C++ project in this folder is also responsible for compiling the scintilla folder code)|\r\n|**scintilla\\winui**|Scintilla platform code for UWP/WinUI 3|\r\n|scintilla|Unmodified Scintilla source code with new winui subfolder|\r\n|lexilla|Lexilla source code (patches noted in [WinUIModified.txt](https://github.com/BreeceW/WinUIEdit/blob/main/lexilla/WinUIModified.txt))|\r\n|Tools|Tools to keep the Scintilla code up-to-date and aid in development (see Tools\\README)|\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBreeceW%2FWinUIEdit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBreeceW%2FWinUIEdit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBreeceW%2FWinUIEdit/lists"}