protected virtual void LoadChildDockingElement(XmlReader xmlReader,
KryptonPageCollection pages,
IDockingElement child)
{
if (child != null)
child.LoadElementFromXml(xmlReader, pages);
else
{
string nodeName = xmlReader.Name;
do
{
// Read past this element
if (!xmlReader.Read())
throw new ArgumentException("An element was expected but could not be read in.");
// Finished when we hit the end element matching the incoming one
if ((xmlReader.NodeType == XmlNodeType.EndElement) && (xmlReader.Name == nodeName))
break;
} while (true);
}
}