public static void GetChildrenXMLLayout(ABCView ownView, DockPanel panel, XmlElement panelElement) { foreach (Control ctrl in panel.Controls) { if (ctrl is DockPanel) { XmlElement childEle = ownView.ComponentSerialization(panelElement.OwnerDocument, ctrl); panelElement.AppendChild(childEle); } else if (ctrl is ControlContainer) { #region Child ComponentDesigner designer = (ComponentDesigner)ownView.Surface.DesignerHost.GetDesigner(ctrl); if (designer != null && designer.AssociatedComponents != null) { List <XmlElement> lstTemp = new List <XmlElement>(); foreach (object associatedComponent in designer.AssociatedComponents) { XmlElement eleChild = ownView.ComponentSerialization(panelElement.OwnerDocument, (IComponent)associatedComponent); if (eleChild != null) { panelElement.AppendChild(eleChild); } } } #endregion } } }
public void GetChildrenXMLLayout(ABCView ownView, XmlElement AutoSearchPanelEle) { foreach (Control ctrl in this.DropZone.Controls) { XmlElement childEle = ownView.ComponentSerialization(AutoSearchPanelEle.OwnerDocument, ctrl); AutoSearchPanelEle.AppendChild(childEle); } }