public static DomElement AddChild(this DomElement elem, string elementName, Decorate d) { DomElement newchild = elem.OwnerDocument.CreateElement(elementName); elem.AddChild(newchild); d?.Invoke(newchild); return(newchild); }
public void UpdateDisplay() { if (InvokeRequired) { Invoke(new Action(UpdateDisplay)); return; } Decorate?.Invoke(this, null); }
public static HtmlElement CreateHtmlSpan(this HtmlDocument doc, Decorate <HtmlElement> dec = null) { var elem = new HtmlElement( doc, 0, doc.AddStringIfNotExists("span")); dec?.Invoke(elem); return(elem); }
public static HtmlImageElement CreateHtmlImageElement(this HtmlDocument doc, Decorate <HtmlImageElement> dec = null) { var elem = new HtmlImageElement( doc, 0, //null=> 0 doc.AddStringIfNotExists("img")); dec?.Invoke(elem); return(elem); }
public void UpdateDisplay() { if (InvokeRequired) { Invoke(new Action(UpdateDisplay)); return; } Text = valueToText(_DisplayValue); Decorate?.Invoke(this, null); }