private void xapFormControl_Load(object sender, EventArgs e) { model = new OrderConfirmCardViewModel(); model.GetSrvCa("CI.OR.0765"); selectMulty = new XComBoxMulty(bc); //传个父窗体 if (RelativeUIParam.ScreenSize == ScreenSize.Large) { selectMulty.Size = new Size(200, 28); } else { selectMulty.Size = new Size(200, 24); } // selectMulty.SearchCondition += new XComBoxMulty.GetSearchCondition(selectMulty_SearchCondition); var data = new Dictionary <object, string>(); if (model.Udis != null) { foreach (UdidocDO udi in model.Udis) { data.Add(udi.Id_udidoc, udi.Name); } } selectMulty.DataSource = data; var controls = new Dictionary <string, Control>(); bc.AddRender(selectMulty); controls.Add("xiala", bc); bc.SizeChanged += bc_SizeChanged; xapFormControl.RegisterControl(controls); OnFillData(); }