private static void MakeList() { jQuery row = new jQuery("<div>").AddClass("row"); jQuery col1 = new jQuery("<div>").AddClass("col-sm-3").AppendTo(row); jQuery col2 = new jQuery("<div>").AddClass("col-sm-9").AppendTo(row); row.Get(0).Style.Padding = "20px"; AccordionPanel p = AccordionPanel.Make("Sharp THREEjs", "(jus a try out :)", "myID", PanelType.panel_default); foreach (KeyValuePair <string, List <BaseDemo> > kvp in Demos) { ListMaker m = new ListMaker(); foreach (BaseDemo d in kvp.Value) { m.AddListItem(d.DemoName, clickDemo, d); } p.AddPanel(kvp.Key, m.List); } col1.Append(p.MainContainer); row.AppendTo(Document.Body); DemoContainer = col2.Get(0); }
void MakeComboBox() { jQuery dd = new jQuery("<div>").AddClass("dropdown").Attr("id", "dropDown"); dropDownButton = new jQuery("<button>").AddClass("btn btn-primary dropdown-toggle"). Attr("id", "dropDownButton"). Attr("type", "button"). Attr("data-toggle", "dropdown"). Html("Choose geometry ").AppendTo(dd); new jQuery("<span>").AddClass("caret").AppendTo(dropDownButton); jQuery ul = new jQuery("<ul>").AddClass("dropdown-menu"). Attr("role", "menu"). Attr("aria-labelledby", "dropDownButton"). AppendTo(dd); foreach (GeometryFunction kvp in functions) { jQuery il = new jQuery("<li>").Attr("role", "presentation"); jQuery a = new jQuery("<a>"). Attr("tabindex", "-1"). Attr("tabindex", "-1"). Attr("href", "#").Html(kvp.name).AppendTo(il); il.AppendTo(ul); il.Click(kvp, (Action <jQueryEvent>) this.listClick); } dd.AppendTo(Container); }
public SvgLayer(StageCanvas canvas, string name) : base(canvas, name) { SvgElement = document.createElementNS(ToolUtils.SvgNamespace, "svg") as SVGSVGElement; Element = new jQuery(SvgElement); Element.AppendTo(canvas.Element); }
public static jQuery SetLastChild(this jQuery query, jQuery childElement) { var children = query?.Children(); if (children == null || children.Length == 0) { childElement.AppendTo(query); return(query); } childElement.InsertAfter(children.Last()); return(query); }