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 ContentTag_should_render_div_and_class() { renderer.ContentTag() .ShouldHaveClasses(UIPrimitives.Window.Content, UIPrimitives.Content) .TagName.ShouldEqual("div"); }