private void AssureTabAdded() { if (this.ParentCollection == null || this.ParentCollection.Owner == null) { return; } RadPageViewElement owner = (RadPageViewElement)this.ParentCollection.Owner; int index = this.ParentCollection.IndexOf((RadItem)this); if (index >= 0) { owner.RemoveItem((RadPageViewItem)this); } owner.InsertItem(index, (RadPageViewItem)this); }
private void AssureTabAdded() { if (this.ParentCollection == null || this.ParentCollection.Owner == null || !(this.ParentCollection.Owner is RadTabStripElement)) { return; } RadPageViewElement tabStrip = (RadPageViewElement)this.ParentCollection.Owner; int index = this.ParentCollection.IndexOf(this); if (index >= 0) { tabStrip.RemoveItem(this); } tabStrip.InsertItem(index, this); }