public void Reset() { bool shouldNotify = UndoCount > 0 || RedoCount > 0; _undoStack.Clear(); _redoStack.Clear(); _currentBatch = null; IsTrackingEnabled = true; if (shouldNotify) NotifyChange(null); }