C#从溶液中不同的项目添加用户控件 [英] C# adding usercontrol from different project in solution

查看:226
本文介绍了C#从溶液中不同的项目添加用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个用户控件在同一解决方案中一个单独的项目,我想在$ B $使用它b我的解决办法是这样的:

I've created a UserControl in a separate project in the same solution I want to use it in. My solution looks like this:

< IMG SRC =http://i.stack.imgur.com/5drXO.pngALT =解决方案布局>

正如你所看到的,我做了一个参照在溶液中的其他项目。
然而,在frmWizard.cs,用户控件不会出现在工具箱中。
(当我创建WizardPages一种形式,它)
我尝试添加一个使用WizardPages.WizardPages.cs来frmWizard.cs,但Visual Studio的报道,不存在的。

As you can see, I made a reference to the other project in the solution. However, in frmWizard.cs, the user control does not appear in the toolbox. (When I create a form in WizardPages, it does) I tried adding a "using WizardPages.WizardPages.cs" to frmWizard.cs, but Visual Studio reported that that did not exist.

任何建议,将不胜感激。

Any suggestions would be appreciated.

推荐答案

您忘了让公众类

这篇关于C#从溶液中不同的项目添加用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆