Add Custom WPFControls to toolbox automatically
I am trying to add a WPF control to the toolbox in VS 2010. I tried setting the ToolboxAutopopulate.This works only within the project. But i want the control to appear every time i open the VS irrespective of the project.
I tried making an entry into the RegEdit after deleting the tdb fils. It somehow doesn't appear in the toolbox still. Can somehow help me?? I don't know what i am missing. If someone wants to know more details i can provide.
The steps i followed were:
Close all running Visual Studio 2008 instances.
Delete *.tbd file located in your \Local\Microsoft\VisualStudio\9.0 folder (for example: C:\Users\\AppData\Local\Microsoft\VisualStudio\9.0 in Vista or 7).
Add a new key to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\ToolboxControlsInstaller
or on x64 OS
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\ToolboxControlsInstaller
The key is named like "QLeftPanel, Version=3.5.30729.1, Culture=开发者_运维百科neutral, PublicKeyToken=cd45d629e1d8d371", where you replace the WpfCustCtrl and PK token value with your own.
In the key created in step 3, add the following values:
(Default) = "My WPF Controls" This is the toolbox tab name, String CodeBase = "C:\Users\Aneesh\Documents\Visual Studio 2010\Projects\QSharedLibrary\QSharedLibrary\bin\Debug\QSharedLibrary.dll" This is the path to your control assembly. WPFControls = "1" This is important!
Try installing your control's design.dll
and visualstudio.design.dll
into GAC. then, take a backup of your existing tbd and delete the existing. Now, launch the Visual Studio, it will create the new tbd files. Now, It should load.
精彩评论