public static void Main() { Document.Body.Style.Padding = "20px"; var form = new FormElement { ClassName = "col-md-6" }; var panel = Html5App.CreatePanel(); form.AppendChild(panel); Document.Body.AppendChild(form); UpdateButton_Click(null); }
protected override Element CreateNode() { form = Browser.Document.CreateElement <FormElement>("form"); form.AddEventListener("submit", OnSubmitting); // This is necessary for enter-on-submit to work since it requires // the presence of a submit button in the form. var hiddenSubmit = Browser.Document.CreateElement("input"); hiddenSubmit.Style.Position = "absolute"; hiddenSubmit.Style.Height = "0px"; hiddenSubmit.Style.Width = "0px"; hiddenSubmit.Style.Border = "none"; hiddenSubmit.Style.Padding = "0px"; hiddenSubmit.SetAttribute("type", "submit"); hiddenSubmit.SetAttribute("hidefocus", "true"); hiddenSubmit.SetAttribute("tabindex", "-1"); form.AppendChild(hiddenSubmit); return(form); }