Creating the User Control

First, you can work on getting in place a user control that has the functionality you are looking for. After you have a workable control, you can worry about wiring that control into Visual Studio using the Connect class created by the Add-in Wizard.

Add a user control (called PaletteControl) to the add-in project by selecting Project, Add User Control. After the control is added, you place nine controls on the user control design surface. First, add a picture box, which is used to display the palette of colors, stored as a simple bitmap in a resource file (in this case, we’re using a color palette from a popular paint program as our source for the bitmap). With the palette in place, you now need six label controls to ...

Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.