protected virtual void FillControlByMultiLevel(SealedControl obj, HtmlNode node, HtmlNode coreNode, PageBrush brush) { var unitNodes = node.SelectNodesEx("core/unit"); var hidden = node.GetAttributeValue("autoHidden", "true") == "true" ? "display:none;" : string.Empty; for (var i = 0; i < unitNodes.Count; i++) { var levelNode = unitNodes[i]; string placeholder = levelNode.GetAttributeValue("placeholder", string.Empty); var group = levelNode.GetAttributeValue("group", "false"); StringBuilder code = new StringBuilder(); if (i + 1 >= unitNodes.Count) { code.AppendFormat("<column {0} style=\"{1}padding-bottom:2px;\" class=\"col-trim\">", LayoutUtil.GetProperiesCode(levelNode), hidden); } else { code.AppendFormat("<column {0} style=\"{1}padding-right:2px;padding-bottom:2px;\" class=\"col-trim\">", LayoutUtil.GetProperiesCode(levelNode), hidden); } code.AppendLine(); code.AppendFormat("<ms:dropdown data-name=\"unit\" emptyItem=\"{0}\" validate=\"false\">", node.GetAttributeValue("emptyItem", "false")); code.AppendLine(); code.AppendLine("<label remove=\"true\"></label>"); code.AppendLine("<core xs=\"12\" class=\"col-trim\">"); code.AppendLine("</core>"); code.AppendLine("</ms:dropdown>"); code.AppendLine("</column>"); obj.Elements.Render(brush, code.ToString()); } }