AddNewWidgetFromTemplate() public method

public AddNewWidgetFromTemplate ( string template ) : object
template string
return object
Example #1
0
        public WidgetInfo AddNewComponent(XmlElement template)
        {
            object          ob = ProjectBackend.AddNewWidgetFromTemplate(template.OuterXml);
            WidgetComponent wc = (WidgetComponent)App.GetComponent(ob, null, null);
            WidgetInfo      wi = GetWidget(wc.Name);

            if (wi == null)
            {
                wi = new WidgetInfo(this, wc);
                widgets.Add(wi);
            }
            return(wi);
        }