ComponentFactory.Krypton.Docking.KryptonDockingWorkspace.RemovePages C# (CSharp) Method

RemovePages() public method

Remove the named pages.
public RemovePages ( string uniqueNames, bool disposePage ) : void
uniqueNames string Array of unique names of the pages that should be removed.
disposePage bool Should the page be disposed when removed.
return void
        public void RemovePages(string[] uniqueNames, bool disposePage)
        {
            // Cannot remove a null reference
            if (uniqueNames == null)
                throw new ArgumentNullException("uniqueNames");

            if (uniqueNames.Length > 0)
            {
                // Cannot remove a null or zero length unique name
                foreach (string uniqueName in uniqueNames)
                {
                    if (uniqueName == null)
                        throw new ArgumentNullException("uniqueNames array contains a null string reference");

                    if (uniqueName.Length == 0)
                        throw new ArgumentException("uniqueNames array contains a zero length string");
                }

                // Remove page details from all parts of the hierarchy
                using (DockingMultiUpdate update = new DockingMultiUpdate(this))
                    base.PropogateAction(disposePage ? DockingPropogateAction.RemoveAndDisposePages : DockingPropogateAction.RemovePages, uniqueNames);
            }
        }

Same methods

KryptonDockingWorkspace::RemovePages ( KryptonPage pages, bool disposePage ) : void