protected override void WriteHtml(HtmlTextWriter writer) { Guard.IsNotNull(writer, "writer"); IWindowHtmlBuilder builder = builderFactory.Create(this); IHtmlNode windowTag = builder.WindowTag(); //Header IHtmlNode headerTag = builder.HeaderTag().AppendTo(windowTag); builder.TitleTag().AppendTo(headerTag); if (Buttons.Container.Count > 0) { IHtmlNode buttonContainerTag = builder.ButtonContainerTag().AppendTo(headerTag); Buttons.Container.Each(button => builder.ButtonTag(button).AppendTo(buttonContainerTag)); } //Content builder.ContentTag().AppendTo(windowTag); //output window HTML windowTag.WriteTo(writer); base.WriteHtml(writer); }
public void WindowTag_should_render_div_tag() { renderer.WindowTag().TagName.ShouldEqual("div"); }