private LayoutControlGroup SetGroup(List <SettingModel> sgroup) { LayoutControlGroup tempGroup = new LayoutControlGroup(); foreach (var item in sgroup) { switch (item.Type) { case SettingType.TEXT: Control con = new TextBox() { }; //con.Size = new Size(150, 80); tempGroup.AddItem(item.Name, con); break; case SettingType.INT: break; case SettingType.DATE: break; case SettingType.CHECK: break; case SettingType.COMBOBOX: break; default: break; } } tempGroup.BestFit(); tempGroup.LayoutMode = LayoutMode.Table; return(tempGroup); }