views:

283

answers:

4

I'm looking for a WPF Gradient Picker example and source code.

The goal is to allow the user of a WPF application to pick the gradient brush to use for a background or foreground. I've seen pickers in Blend (too confusing for a casual user) and Photo Shop. I'm looking for a WPF implementation of something along the line of the Photo Shop picker implemented as a WPF dialog box.

Any pointers to good examples much appreciated.

Thanks.

A: 

You can check out this article on CodeProject: "A Simple Color Picker With Preview"

Jalfp
Thanks. I've seen a couple of WPF Color Pickers, but I need to pick a gradiant, with stop points, padding style, etc.
rathkopf
+1  A: 

Random gradient wallpaper generator. closest thing I could find... unfortunately it only has four possible gradient stops, one in each corner... worth looking at the code perhaps, and getting a few tips...

luvieere
Thanks. This code may be something that can serve as a starting point.
rathkopf
A: 

It seems like something that would be pretty easy to code, in terms of a custom control.

Just have a canvas that you change the background of, with some other controls for changing the colour and the stop points.

Alastair Pitts
+1  A: 

Found it, this one too on the CodeProject: .Net Protoshop-like gradient picker. Enjoy ;)

luvieere