当前位置: 首页>>代码示例>>C#>>正文


C# HtmlTag.AppendTo方法代码示例

本文整理汇总了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);
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:26,代码来源:GridFilterAdorner.cs

示例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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:13,代码来源:GridRefreshHtmlBuilder.cs

示例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);
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:15,代码来源:GridToggleDetailViewAdorner.cs

示例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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:15,代码来源:EditorButtonHtmlBuilder.cs

示例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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:16,代码来源:GridPagerButtonHtmlBuilder.cs

示例6: InnerContentTag

        private IHtmlNode InnerContentTag()
        {
            IHtmlNode root = new HtmlTag("div").AddClass("t-dropdown-wrap", UIPrimitives.DefaultState);

            new HtmlTag("span")
                .AddClass("t-input")
                .Html("&nbsp;")
                .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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:20,代码来源:EditorSelectBoxHtmlBuilder.cs

示例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 : "&nbsp;")
                .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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:20,代码来源:DropDownListHtmlBuilder.cs

示例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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:21,代码来源:GridPagerTextBoxHtmlBuilder.cs

示例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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:23,代码来源:EditorCustomToolHtmlBuilder.cs

示例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;
        }
开发者ID:juanplopes,项目名称:simple-telerik,代码行数:39,代码来源:ComboBoxHtmlBuilder.cs


注:本文中的HtmlTag.AppendTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。