public void Redo() { if (CanRedo) { CurrentDrawingContext = RedoBuffer.Pop(); UndoBuffer.Push(CurrentDrawingContext.Clone()); } }
private void CurrentDrawingContext_PropertyChanged(object sender, PropertyChangedEventArgs e) { UndoBuffer.Push(CurrentDrawingContext.Clone()); RedoBuffer.Clear(); Invalidate(); }