示例#1
0
        public override HtmlControl GenerateNavbar()
        {
            PkCustomControl Li = PkCustomControl.ListItem("nav-item");

            Li.AddControl(this);
            return(Li.GenerateNavbar());
        }
示例#2
0
        public override HtmlControl Generate()
        {
            PkCustomControl Li = PkCustomControl.ListItem("nav-item dropdown");

            HtmlButton DropdownButton = GenerateButton(StyleStr);

            DropdownButton.InnerText                   = Text;
            DropdownButton.Attributes["type"]          = "button";
            DropdownButton.Attributes["data-toggle"]   = "dropdown";
            DropdownButton.Attributes["aria-haspopup"] = "true";
            DropdownButton.Attributes["aria-expanded"] = "false";
            Li.AddControl(DropdownButton);

            HtmlGenericControl Div = GenerateDiv("dropdown-menu");

            foreach (var C in Controls)
            {
                Div.Controls.Add(C.Generate());
            }

            Li.AddControl(Div);
            return(Li.Generate());
        }