Archive for the ‘color’ Category.

Final-ish Silverlight Color Picker Utility

Seeing as how I’ve already spent far too much time on this little project, barring major problems with this control (please point them out!) this will probably be my last version of the control. My ADD is kicking in and I need to work on something else.

If you’re interested in having the compact version of this control as a gadget, you can find it here.

Download Source for Color Picker Control

Download dll for Color Picker Control

Download Source for Color Picker Implementation (seen below)

Using the color picker in Blend

To add this to your application, just add the DLL above to your application by right clicking on the References folder in your Silverlight app.

clip_image001

Find the DLL and bring it into the application.

Open up the asset library (the bottom of the tool bar on the far left) and go to “Custom Controls”. You should find the ColorPicker in there.

clip_image001[5]

Now you can just draw the whole thing right into your application.

clip_image001[7]

Easy as pie.

You can swap between an extended view and a compact view by changing the “IsCompact” property. Compact view is basically gadget sized and expanded view can be as big as the screen if you want it to be.

Whenever you change the color, the control fires off a “ColorChanged” event. I thought that would be valuable for dynamic interactions. Hopefully you can find some fun uses for it.

Updated Silverlight Color Picker Gadget

I’ve finally updated my Silverlight color picker and it was none too soon, if you ask me. I’ve been missing this thing ever since the last compatibility break. Here you can download the source.

Download Source for Color Picker Gadget

And here you can download the gadget.

Download Color Picker Gadget

And here you can check it out.

As you can see, I’ve updated a number of things, not the least of which was the fact that I was using a slider for the hue to the right in the old version. The new one uses an interface of my own because the slider wasn’t flexible enough for what I needed.

I also added functionality so that clicking on the color boxes selects all the text. I have a blog post on how to do that if you’re so inclined.

I’ve made some discoveries regarding creating Silverlight gadgets, but that is a post in and of itself. It’s coming.

Silverlight Color Picker

UPDATE (12/05/08):

Updated Color Picker Utility

UPDATE: I’ve posted links to all my code here.

I apologize, but I don’t have the time right now to go over how I made this, but I did want to take the time to show it off.

(Sample removed because of incompatibility with current version, please visit the updated post linked at the top)

Copy the following to paste this app into web page: