Search code examples
visual-studiovisual-studio-2008templatestoolbox

How to adjust Visual Studio Toolbox to active document?


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?


Solution

  • 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