Pick a color, any... "Integrated Color Picker for Visual Studio IDE"

Today's Visual Studio Extension is more of a "teach you how to fish" kind of extension as anything. As he does so well, Shemeer NS, of Shemeer's World of Programming, has posted another project where he leverages another Control to create a Visual Studio addin that fits just what he needs, showing you all just how he does it.

Integrated Color Picker for Visual Studio will be very useful to you, if you are working as a Web Developer or UI designer, who mainly uses Visual Studio for their day to day assignments. In this article I'm going to give you a walkthrough on the Color Picker AddIn (or Plugin).

If you like to get latest version of Color Picker AddIn then click here.

Background

Sometimes I used to work in UI designing like changing color or alignment using CSS and or HTML markups and I found difficulty in getting a color picker directly from the IDE for my purpose. So I thought to write my own color picker plugin for visual studio. I will be sharing the initial code here so that you also can play with it.

Using the code

I have used some components from Extended WPF Toolkit for this Color Picker tool. Before you start on this, it would better to have a look on the article 'Using Color Canvas and Color Picker from Extended WPF Toolkit', so that you will get to know the implementation of Color Canvas, Color Picker from Extended WPF Toolkit.

There are many ways to extend Visual Studio. Three common ones are: automation, VSPackage extensions, and Managed Extensibility Framework (MEF) extensions. Visual Studio add-ins are deprecated in Visual Studio 2013. You should upgrade your add-ins to VSPackage extensions.

I will be using Visual Studio Package (VSPackage) for creating this AddIn, You might be interested in Web Search that is created using Visual Studio Add-In project template.

To start developing Visual Studio extensions, you first need to download and install the Visual Studio SDK at the Visual Studio 2013 SDK download website. It is compatible with the Visual Studio 2013 Professional, Premium, or Ultimate editions. I'm using Visual Studio 2013, if you are using a different version then make sure you have the right version of Visual Studio SDK installed.

New Project

...

...

Now lets talk about the actual color picker implementation. As we are utilizing components from Extended WPF Toolkit we need to refer the toolkit binaries in our application.

Introduction

Some days back I got a chance to work on WPF with Extended WPF Toolkit and I really got impressed with the controls they have offered. I am using this article to demonstrate the implementation of Color Canvas, Color Picker from the Extended WPF Toolkit. I hope this will be useful to you if you are planning to add a color picker functionality in your WPF application.

Extended WPF Toolkit

Extended WPF Toolkit™ contains a collection of WPF controls, components and utilities for creating next generation Windows applications. Use it to build professional looking, modern, and easy to use line of business applications. The free, open source Community Edition comes with many useful controls and Plus version comes with some additional controls.

If you want to explore the Extended WPF Toolkit then Live Explorer app is available online as a Click Once app. Try it now!.

In this article we will go through the Color Canvas and Color Picker controls.

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums, or
Contact Us and let us know.