简体   繁体   English

如何解决C#Windows Forms项目上WPF组件中的错误?

[英]How to solve the error in WPF component on c# windows forms project?

I have created the Windows C# project.There is one windows form. 我已经创建了Windows C#项目。有一个Windows窗体。 In the same project I created a WPF component and when i try to place this component on windows form some error is coming "Failed to create component". 在同一个项目中,我创建了一个WPF组件,当我尝试将该组件放置在Windows窗体上时,出现一些错误“无法创建组件”。

Please check the link below to get more details about error. 请检查下面的链接以获取有关错误的更多详细信息。

1.When I drag the component from toolbox to form this error comes: 1.当我从工具箱中拖动组件以形成此错误时: 在此处输入图片说明

2.while i select the WPF component in ElementHost I get this error: 2.当我在ElementHost中选择WPF组件时,出现此错误: 在此处输入图片说明

Please help me this. 请帮我这个。

您的组件Grid_Buttons没有默认构造函数,该构造函数没有设计人员自动生成代码所需的参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM