/// <summary> /// 获取标签生成器 /// </summary> protected override TagBuilder GetTagBuilder() { var builder = new DivBuilder(); Config(builder); return(builder); }
/// <summary> /// 配置布局策略 /// </summary> private void ConfigFlex(TagBuilder builder) { if (_config.Contains(UiConst.Flex) == false) { return; } var itemBuilder = new DivBuilder(); itemBuilder.AddAttribute("fxFlex", _config.GetValue(UiConst.Flex)); itemBuilder.AppendContent(_config.Content); builder.AppendContent(itemBuilder); }
public void BuildColoredBoxes() { // clear the document body var jqBody = jQuery.Select(window.document.body); jqBody.empty(); // build the boxes var builder = new DivBuilder(); for (int i = 0; i < Colors.length; i++) { builder.CreateBox(Colors[i], 100); } // check that four children exist on the body Assert.AreEqual(4, jqBody.children().length); }