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 TitleTag_should_render_span_with_proper_className() { renderer.TitleTag().ShouldHaveClass("t-window-title"); }