Have you seen the Toolbox Controls Installer?
A really cool new feature for Visual Studio 2008 is the Toolbox Controls Installer which as the name implies, allows you to add controls to the toolbox. It's much easier than some of the previous VS package type work you used to need to do.
There is a great sample in the Visual Studio SDK 2008 that shows you how to add a Windows Forms control, Web Control and WPF control to the toolbox programmatically. The sample is called "Controls" -- and includes a WPF control and design time that may be familiar to those of you who have been reading my blog. (I'm surprised at how much mileage some of my samples get!)
There is one caveat, in some of the online documentation that doesn't show the WPF example (it was added later), there is a missing registry value that is required to make this work:
<Registry Root="HKLM" Key="$(var.VisualStudioRegistryRoot)\ToolboxControlsInstaller\CustomControlLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1631b3e7a8fbcce5" Value="Litware Controls" Type="string">
<Registry Name="Codebase" Value="[#CustomControlLibrary.dll]" Type="string" />
<Registry Name="WPFControls" Value="1" Type="string" />
</Registry>
The "WPFControls" value above.
Very cool feature, really simplifies toolbox installation. Note: this is implemented in VS 2008 Beta 2.
Comments
Anonymous
September 26, 2007
PingBack from http://www.artofbam.com/wordpress/?p=3204Anonymous
September 27, 2007
The comment has been removedAnonymous
October 01, 2007
Divil-- I believe the Toolbox controls installer is included with vs 2008. RobAnonymous
October 03, 2007
The comment has been removedAnonymous
April 20, 2011
Is there a similar way to register Windows Phone 7 controls? Thank you!