Error when adding user-defined control to a form.

谁都会走 提交于 2020-01-07 03:02:53

问题


I have an user-defined control which includes a property ElementList of IList<WFParament> type. When I add my control into a form, I get the error:

"WorkFlowDesign.WFParament[]" can't be transfered into "WorkFlowDesign.WFParament[]"

回答1:


Does your usercontrol do anything on load? If so, try wrapping it in:

if(!DesignMode)
{
     //Do something
}



回答2:


I would verify that you don't have two versions of the assembly containing the type WorkFowDesign.WFParament loaded/referenced. This could happen if your project where you are using the user control references one version of the assembly while the user defined control is compiled against a different version. If this is the case you will need to update one of the two so that they are referencing the same version of the assembly containing WorkflowDesign.WFParament.



来源:https://stackoverflow.com/questions/9901987/error-when-adding-user-defined-control-to-a-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!