本文整理汇总了C#中HtmlTag.AppendTo方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTag.AppendTo方法的具体用法?C# HtmlTag.AppendTo怎么用?C# HtmlTag.AppendTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlTag
的用法示例。
在下文中一共展示了HtmlTag.AppendTo方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyTo
public void ApplyTo(IHtmlNode target)
{
var filtered = column.Grid.DataProcessor.FilterDescriptors.SelectRecursive(filter =>
{
CompositeFilterDescriptor compositeDescriptor = filter as CompositeFilterDescriptor;
if (compositeDescriptor != null)
{
return compositeDescriptor.FilterDescriptors;
}
return null;
})
.Where(filter => filter is FilterDescriptor)
.OfType<FilterDescriptor>()
.Any(filter => filter.Member.IsCaseInsensitiveEqual(column.Member));
var wrapper = new HtmlTag("div")
.AddClass("t-grid-filter", "t-state-default")
.ToggleClass("t-active-filter", filtered);
wrapper.AppendTo(target);
var icon = new HtmlTag("span").AddClass("t-icon", "t-filter");
icon.AppendTo(wrapper);
}
示例2: BuildCore
protected override IHtmlNode BuildCore()
{
var div = new HtmlTag("div")
.AddClass("t-status");
var a = new HtmlTag("a")
.AddClass(UIPrimitives.Icon, "t-refresh")
.Attribute("href", url);
a.AppendTo(div);
return div;
}
示例3: ApplyTo
public void ApplyTo(IHtmlNode target)
{
var td = new HtmlTag("td")
.AddClass(UIPrimitives.Grid.HierarchyCell);
var a = new HtmlTag("a")
.Attribute("href", "#")
.AddClass(UIPrimitives.Icon)
.ToggleClass("t-plus", !Expanded)
.ToggleClass("t-minus", Expanded);
a.AppendTo(td);
target.Children.Insert(0, td);
}
示例4: BuildCore
protected override IHtmlNode BuildCore()
{
var li = new HtmlTag("li")
.AddClass(UIPrimitives.Editor.ToolbarButton);
var a = new HtmlTag("a")
.Attribute("href", "#")
.AddClass(UIPrimitives.Editor.ToolIcon)
.AddClass(button.CssClass)
.Text(button.Text);
a.AppendTo(li);
return li;
}
示例5: BuildCore
protected override IHtmlNode BuildCore()
{
var a = new HtmlTag("a")
.AddClass(UIPrimitives.Link)
.ToggleClass(UIPrimitives.DisabledState, !Enabled)
.Attribute("href", Url)
.ToggleAttribute("href", "#", !Enabled);
var span = new HtmlTag("span")
.AddClass(UIPrimitives.Icon, "t-arrow-" + Text)
.Text(Text);
span.AppendTo(a);
return a;
}
示例6: InnerContentTag
private IHtmlNode InnerContentTag()
{
IHtmlNode root = new HtmlTag("div").AddClass("t-dropdown-wrap", UIPrimitives.DefaultState);
new HtmlTag("span")
.AddClass("t-input")
.Html(" ")
.AppendTo(root);
IHtmlNode link = new HtmlTag("span").AddClass("t-select");
new HtmlTag("span")
.AddClass(UIPrimitives.Icon, "t-arrow-down")
.Html("select")
.AppendTo(link);
link.AppendTo(root);
return root;
}
示例7: InnerContentTag
public IHtmlNode InnerContentTag()
{
IHtmlNode root = new HtmlTag("div").AddClass("t-dropdown-wrap", UIPrimitives.DefaultState);
new HtmlTag("span")
.AddClass("t-input")
.Html(Component.Items.Any() ? Component.Items[Component.SelectedIndex].Text : " ")
.AppendTo(root);
IHtmlNode link = new HtmlTag("span").AddClass("t-select");
new HtmlTag("span")
.AddClass(UIPrimitives.Icon, "t-arrow-down")
.Html("select")
.AppendTo(link);
link.AppendTo(root);
return root;
}
示例8: BuildCore
protected override IHtmlNode BuildCore()
{
var div = new HtmlTag("div")
.AddClass("t-page-i-of-n");
var page = new LiteralNode(localization.Page);
page.AppendTo(div);
var input = new HtmlTag("input")
.Attribute("type", "text")
.Attribute("value", Value);
input.AppendTo(div);
var of = new LiteralNode(string.Format(localization.PageOf, TotalPages));
of.AppendTo(div);
return div;
}
示例9: BuildCore
protected override IHtmlNode BuildCore()
{
var li = new HtmlTag("li");
if (tool.Template.HasValue())
{
li.AddClass(UIPrimitives.Editor.Custom);
tool.Template.Apply(li);
}
else
{
li.AddClass(UIPrimitives.Editor.ToolbarButton);
var a = new HtmlTag("a")
.Attributes(tool.HtmlAttributes)
.Attribute("href", "#")
.AddClass(UIPrimitives.Editor.ToolIcon);
a.AppendTo(li);
}
return li;
}
示例10: InnerContentTag
public IHtmlNode InnerContentTag()
{
IHtmlNode root = new HtmlTag("div").AddClass("t-dropdown-wrap t-state-default");
IHtmlNode input = new HtmlTag("input")
.Attributes(new { type = "text",
title = Component.Id })
.Attributes(Component.InputHtmlAttributes)
.PrependClass(UIPrimitives.Input)
.AppendTo(root);
if(Component.Items.Any() && Component.SelectedIndex != -1)
{
input.Attribute("value", Component.Items[Component.SelectedIndex].Text);
}
if (Component.Id.HasValue())
{
input.Attributes(new
{
id = Component.Id + "-input",
name = Component.Name + "-input"
});
string value = Component.ViewContext.Controller.ValueOf<string>(Component.Name + "-input");
if (value.HasValue())
{
input.Attribute("value", value);
}
}
IHtmlNode link = new HtmlTag("span").AddClass("t-select", UIPrimitives.Header);
new HtmlTag("span").AddClass(UIPrimitives.Icon, "t-arrow-down").Html("select").AppendTo(link);
link.AppendTo(root);
return root;
}