如何将 Visual Studio Toolbox 调整为活动文档?
我已经实现了一组 ASP.NET Web 自定义控件,并将它们添加到我的 Visual Studio 2008 工具箱中。我还创建了一些用户项模板,它们基本上是带有一些预配置的 ASP.Net Webforms 页面。
我现在想为每个项目模板分配一个自定义控件的子集,在编辑从模板创建的文件时,这些控件将在工具箱中可用。实现这一目标的最佳方法是什么?
I have implemented a set of ASP.NET web custom controls and added these to my Visual Studio 2008 Toolbox. I also created some user item templates, which are basically ASP.Net Webforms pages with some preconfigurations.
I would now like to assign each item template a subset of my custom controls that shall be available in the toolbox while editing a file created from the template. What is the best way to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

这个问题似乎没有既定的解决方案。因此,我选择了一个插件,当用户在文档窗口之间切换时,该插件会挂钩,然后使用 EnvDTE 操作工具箱。
然而,我在使用 ToolBox API 时遇到了奇怪的问题。请参阅我的另一篇文章: https://stackoverflow.com/questions/3606821/weird-behavior- of-vs-工具箱
It seems like there is no established solution to this problem. Thus, i went for an add-in which hooks in when the user switches between document windows and than manipulates the toolbox using EnvDTE.
However, I ran into weird problems using the ToolBox API. Please see my other post: https://stackoverflow.com/questions/3606821/weird-behavior-of-vs-toolbox