public void Undo() { if (_undoStack.Count > 0) { IGameCommand cmd = (IGameCommand)_undoStack.Pop(); cmd.Undo(); _redoStack.Push(cmd); OnPropertyChanged("UndoStackCount"); OnPropertyChanged("RedoStackCount"); } }