/// <summary> /// Checks that the provided set of pages are not already present in the docking hierarchy. /// </summary> public void DemandPagesNotBePresent(KryptonPage[] pages) { // We need a docking manager in order to perfrom testing DemandDockingManager(); // We always allow store pages but check that others are not already present in the docking hierarchy foreach (KryptonPage page in pages) { if (!(page is KryptonStorePage) && DockingManager.ContainsPage(page)) { throw new ArgumentOutOfRangeException(nameof(pages), "Cannot perform operation with a page that is already present inside docking hierarchy"); } } }