ComponentFactory.Krypton.Docking.KryptonAutoHiddenGroup.StorePages C# (CSharp) Method

StorePages() public method

Convert the named pages into store placeholders.
public StorePages ( string uniqueNames ) : void
uniqueNames string Array of page names.
return void
        public void StorePages(string[] uniqueNames)
        {
            foreach (string uniqueName in uniqueNames)
            {
                // If a matching page exists and it is not a store placeholder already
                KryptonPage page = Pages[uniqueName];
                if ((page != null) && !(page is KryptonStorePage))
                {
                    // Notify that we are storing a page, so handlers can ensure it will be unique to the auto hidden location
                    OnStoringPage(new UniqueNameEventArgs(page.UniqueName));

                    // Replace the existing page with a placeholder that has the same unique name
                    KryptonStorePage placeholder = new KryptonStorePage(uniqueName, "AutoHiddenGroup");
                    Pages.Insert(Pages.IndexOf(page), placeholder);
                    Pages.Remove(page);
                }
            }
        }