public void LoadXml(XmlDocument xDoc, XmlNode rootNode, Boolean refLoad = false) { if (rootNode == null) { return; } XmlControlHandler.GetDefaultControlAttributes(rootNode, xDoc, this); this.TextAlign = GlobalVars.ContentAlignment(XmlGetter.Attribute(rootNode, "TextAlign")); string disIndex = XmlGetter.Attribute(rootNode, "DisabledImageIndex"); if (disIndex.Length > 0) { this.U_ButtonDisabledType = int.Parse(disIndex); } string color = XmlGetter.Attribute(rootNode, "ActivationColor"); if (color.Length > 0) { this.ActiveBackColor = ValueParser.StringToColor(color); } string imageLayout = XmlGetter.Attribute(rootNode, "ImageLayout"); if (imageLayout.Length > 0) { this.BackgroundImageLayout = (ImageLayout)GlobalVars.ImageLayouts.ToList().IndexOf(imageLayout); } else { this.BackgroundImageLayout = ImageLayout.Zoom; } //this.BackgroundImageLayout = ImageLayout.Stretch; XmlNode XImages = XmlGetter.Child(rootNode, "Images");// rootNode.SelectSingleNode("Images"); _imageList.LoadXml(xDoc, XImages); /* * * for (int i = 0; i < rootNode.ChildNodes.Count; i++) * { * XmlNode xChild = rootNode.ChildNodes[i]; * if (xChild.Name.Equals("Events")) * { * _events.LoadXml(xDoc, xChild); * } * else if (xChild.Name.Equals("Images")) * { * _imageList.LoadXml(xDoc, xChild); * //_imageList = new XmlImageList(); * this.U_ImageList = _imageList; * * } * } */ }