用户控件未显示在工具箱中 [英] User Controls not showing up in the toolbox

查看:172
本文介绍了用户控件未显示在工具箱中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些在ProjectA中创建的UserControls.我有ProjectB,它具有要放置控件的Windows窗体.这两个项目都在一个解决方案中.在ProjectB中有一个对ProjectA的引用,因此它可以查看"用户控件.

I have some UserControls that I created in ProjectA. I have ProjectB that has a windows form that I want to put the controls on. Both of these projects are in a single solution. There's a reference to ProjectA from ProjectB so it can "see" the UserControls.

但是,用户控件没有出现在工具箱中,我无法拖动到Windows窗体上.

However, the UserControls do not show up in the toolbox for me to drag to the windows form.

我尝试重建.我还删除了'bin'目录以强制全部重建.

I've tried rebuilding. I've also deleted the 'bin' directory to force a rebuild-all.

如何让VS2008用我的UserControl填充工具箱?

How do I get VS2008 to populate the toolbox with my UserControls?

推荐答案

检查此设置:

工具>选项> Windows窗体设计器>常规:AutoToolboxPopulate

Tools > Options > Windows Forms Designer > General : AutoToolboxPopulate

为使其正常工作,应将其设置为True.

It should be set to True for this to work.

这篇关于用户控件未显示在工具箱中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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