/// <inheritdoc /> override protected void OnInitialized() { expanded = Expanded; if (expanded) { Tree?.ExpandItem(this); } selected = Selected; if (selected) { Tree?.SelectItem(this); } if (Tree != null && ParentItem == null) { Tree.AddItem(this); } if (ParentItem != null) { ParentItem.AddItem(this); } }