A Sample Add-in: Color Palette

To cap this discussion of add-ins, let’s look at the process of developing a functioning add-in from start to finish. The add-in is a color picker. It enables users to click on an area of a color palette, and the add-in emits code to create an instance of a color structure that matches the selected color from the palette. Here is a summary list of requirements for the add-in:

• In a tool window, it displays a visual color palette representing all the possible colors.

• As the mouse pointer is moved over the palette, the control displays the Red, Green, and Blue values for the point directly under the mouse pointer.

• If a user clicks on the palette, it takes the current RGB values and emits C# or VB code into ...

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.