This sample demonstrates how to create a Visual Studio package (VSPackage) that loads custom Winforms controls into the Toolbox. The code defines two different types of controls: a normal Winforms control (MyCustomTextBox) and a custom Winforms control that has a custom ToolboxItem class that pops up a dialog box when the item is added. It can be attributed to be hidden from the Toolbox (MyCustomTextBoxWithPopup) - see the comments in code. The code in the sample is for demonstration purpose only and does not reflect the real scenario.
To start the sample:
- Open the WinformsControlsInstaller.sln solution.
- Press F5 to build the sample, register it in the experimental instance, and launch Visual Studio from the experimental instance.
|