EditingSystem

Undo/redo for modern .NET editors

NativeAOT-friendly undo/redo for modern .NET editors: source-generated properties, continuous gestures, transactions, and observable collections.

Get started Try the demo NuGet GitHub

dotnet add package Jewelry.EditingSystem

Generated properties

[Undoable] partial properties record normal edits, Undo, and Redo through the same generated setter path.

Continuous edits

CoalescingBatch() reduces a slider, drag, or color-picker gesture to one meaningful Undo step.

Safe grouped edits

Transaction() commits or restores tracked edits as a unit; Batch() groups changes that should remain applied.

Collections and MVVM

Track observable collection changes and preserve CommunityToolkit.Mvvm notifications, validation, commands, and messaging.

Quick example

using Jewelry.EditingSystem;
using Jewelry.EditingSystem.Annotations;

[EditingHistory(nameof(history))]
public sealed partial class Document(History history)
{
    [Undoable]
    public partial double X { get; set; }
}

using var history = new History();
var document = new Document(history);
document.X = 100;
history.Undo(); // X == 0

日本語版はこちら