ComponentFactory.Krypton.Docking.DockingElement.DemandPagesNotBePresent C# (CSharp) Method

DemandPagesNotBePresent() public method

Checks that the provided set of pages are not already present in the docking hierarchy.
public DemandPagesNotBePresent ( KryptonPage pages ) : void
pages ComponentFactory.Krypton.Navigator.KryptonPage
return void
        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("Cannot perform operation with a page that is already present inside docking hierarchy");
        }