/// <inheritdoc /> public void Dispose() { if (ParentItem != null) { ParentItem.RemoveItem(this); } else if (Tree != null) { Tree.RemoveItem(this); } }