/// <summary>
        /// Saves docking configuration information using a provider xml writer.
        /// </summary>
        /// <param name="xmlWriter">Xml writer object.</param>
        public override void SaveElementToXml(XmlWriter xmlWriter)
        {
            KryptonDockingManager manager = DockingManager;

            // Output docking manager element
            xmlWriter.WriteStartElement(XmlElementName);
            xmlWriter.WriteAttributeString("N", Name);
            xmlWriter.WriteAttributeString("C", AutoHiddenGroupControl.Pages.Count.ToString());

            // Output an element per page
            foreach (KryptonPage page in AutoHiddenGroupControl.Pages)
            {
                // Are we allowed to save the page?
                if (page.AreFlagsSet(KryptonPageFlags.AllowConfigSave))
                {
                    xmlWriter.WriteStartElement("KP");
                    xmlWriter.WriteAttributeString("UN", page.UniqueName);
                    xmlWriter.WriteAttributeString("V", CommonHelper.BoolToString(page.LastVisibleSet));
                    xmlWriter.WriteAttributeString("S", CommonHelper.BoolToString(page is KryptonStorePage));

                    // Give event handlers a chance to save custom data with the page
                    xmlWriter.WriteStartElement("CPD");
                    DockPageSavingEventArgs args = new DockPageSavingEventArgs(manager, xmlWriter, page);
                    manager?.RaisePageSaving(args);
                    xmlWriter.WriteEndElement();

                    xmlWriter.WriteFullEndElement();
                }
            }

            // Terminate the workspace element
            xmlWriter.WriteFullEndElement();
        }
        /// <summary>
        /// Saves docking configuration information using a provider xml writer.
        /// </summary>
        /// <param name="xmlWriter">Xml writer object.</param>
        public override void SaveElementToXml(XmlWriter xmlWriter)
        {
            // Output navigator docking element
            xmlWriter.WriteStartElement(XmlElementName);
            xmlWriter.WriteAttributeString(@"N", Name);
            xmlWriter.WriteAttributeString(@"C", DockableNavigatorControl.Pages.Count.ToString());

            // Persist each child page in turn
            KryptonDockingManager dockingManager = DockingManager;

            foreach (KryptonPage page in DockableNavigatorControl.Pages)
            {
                // Are we allowed to save the page?
                if (page.AreFlagsSet(KryptonPageFlags.AllowConfigSave))
                {
                    xmlWriter.WriteStartElement("KP");
                    CommonHelper.TextToXmlAttribute(xmlWriter, @"UN", page.UniqueName);
                    CommonHelper.TextToXmlAttribute(xmlWriter, @"S", CommonHelper.BoolToString(page is KryptonStorePage));
                    CommonHelper.TextToXmlAttribute(xmlWriter, @"V", CommonHelper.BoolToString(page.LastVisibleSet), @"True");

                    // Give event handlers a chance to save custom data with the page
                    xmlWriter.WriteStartElement(@"CPD");
                    DockPageSavingEventArgs args = new DockPageSavingEventArgs(dockingManager, xmlWriter, page);
                    dockingManager.RaisePageSaving(args);
                    xmlWriter.WriteEndElement();

                    // Terminate the page element
                    xmlWriter.WriteEndElement();
                }
            }

            // Output an xml for the contained workspace

            // Terminate the workspace element
            xmlWriter.WriteFullEndElement();
        }