public IHtmlNode ContentTag()
{
var content = new HtmlTag("div")
.AddClass("t-window-content", UIPrimitives.Content)
.Css("overflow", Window.Scrollable ? "auto" : "hidden")
.Attributes(Window.ContentHtmlAttributes);
if (Window.Width != 0)
{
content.Css("width", Window.Width + "px");
}
if (Window.Height != 0)
{
content.Css("height", Window.Height + "px");
}
if (Window.ContentUrl.HasValue()
&& (Window.ContentUrl.StartsWith("http", System.StringComparison.InvariantCultureIgnoreCase)
|| Window.ContentUrl.StartsWith("https", System.StringComparison.InvariantCultureIgnoreCase)))
{
new HtmlTag("iframe")
.Attributes(new {
src = Window.ContentUrl,
title = Window.Title,
style = "border: 0; width: 100%; height: 100%;",
frameborder = "0"
})
.AppendTo(content);
}
else if (Window.Template.HasValue())
{
Window.Template.Apply(content);
}
return content;
}