TodoList.Avalonia
0.2.10
dotnet add package TodoList.Avalonia --version 0.2.10
NuGet\Install-Package TodoList.Avalonia -Version 0.2.10
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="TodoList.Avalonia" Version="0.2.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TodoList.Avalonia" Version="0.2.10" />
<PackageReference Include="TodoList.Avalonia" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TodoList.Avalonia --version 0.2.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TodoList.Avalonia, 0.2.10"
#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.
#:package TodoList.Avalonia@0.2.10
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TodoList.Avalonia&version=0.2.10
#tool nuget:?package=TodoList.Avalonia&version=0.2.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
TodoList.Avalonia
A custom rich-text todo-list editor control for Avalonia UI, targeting .NET 10.
Features
- Checkbox todo items with strikethrough for completed items
- Rich text editing with inline images (inline and block display modes)
- Full undo/redo
- Clipboard integration — paste text and images
- Fully themeable — all colors and layout constants exposed as Avalonia
StyledProperty - MVVM-first — bind
ItemsandImagescollections, zero imperative code needed - Dirty tracking —
IsDirtyproperty withDirtyChangedevent andMarkClean() - Markdown helpers —
TodoMarkdown.ParseMarkdown()/ToMarkdown()for- [x] textformat - Cross-platform via Avalonia (Windows, macOS, Linux)
Installation
dotnet add package TodoList.Avalonia
Usage (MVVM)
1. MarkdownText — single-string binding
Bind MarkdownText for two-way markdown sync (simplest approach):
<todo:TodoListEditor MarkdownText="{Binding Markdown}" />
2. Items + Images — collection binding
Bind Items and Images collections for full control:
<todo:TodoListEditor Items="{Binding Items}" Images="{Binding Images}" />
// ViewModel
public ObservableCollection<TodoItemData> Items { get; } = new();
public ObservableCollection<TodoImageEntry> Images { get; } = new();
Markdown helpers
Static helpers for manual conversion (accepts both - [x] text and [x] text formats):
// Load
foreach (var item in TodoMarkdown.ParseMarkdown(markdown))
Items.Add(item);
// Save
var markdown = TodoMarkdown.ToMarkdown(Items);
Deferred image loading
var entry = new TodoImageEntry("photo"); // null bitmap
Images.Add(entry);
// ...later, when loaded:
entry.Bitmap = await LoadBitmapAsync(url); // triggers re-render
Image references in text
Item text can contain markdown-compatible image references: . Images resolve from the bound Images collection by key.
Building from Source
dotnet build TodoList.Avalonia.slnx
dotnet run --project TodoList.Avalonia.Demo
dotnet run --project TodoList.Avalonia.Demo -- --mvvm
dotnet test TodoList.Avalonia.Tests
Project Structure
TodoList.Avalonia/ Core library
Controls/
TodoListEditor.cs Main editor control (rendering, input, selection)
Model/
DocumentModel.cs TodoDocument, TodoItem, ContentElement
TodoItemData.cs MVVM data model with INotifyPropertyChanged
TodoImageEntry.cs Observable image entry (Key + Bitmap)
TodoMarkdown.cs Markdown parse/serialize helpers
TodoItemsChangedEventArgs.cs ChangeKind enum + event args
ImagePastedEventArgs.cs Image paste event args
TodoList.Avalonia.Demo/ Demo application
MvvmWindow.axaml/.cs XAML MVVM demo
MainWindow.cs Imperative/legacy demo
TodoViewModel.cs Sample ViewModel
TodoList.Avalonia.Tests/ NUnit tests (headless Avalonia)
Roadmap
- Android soft keyboard support — implement
ITextInputMethodClientso the on-screen keyboard appears when the editor receives focus on mobile platforms
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Avalonia (>= 12.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.