/// <summary> /// Adds element to the list and adds <see cref="AddCommand{T}"/> to the corresponding <see cref="CommandStack"/> /// </summary> public void AddWithUndoRedoTracking(T item) { Add(item); _commandStack.Push(new AddCommand <T>(this, Count - 1, item)); }