WPF – Colour Picker Widget With Attached Properties

added by ButtonChrome
11/21/2010 2:52:36 AM

0 Kicks, 125 Views

We can set the colour of any WPF control that supports it, but what about being able to specifically setting individual colour channels (RED, GREEN, BLUE, ALPHA) I've seen many solutions that contain complex custom controls, but one of the key philosophies of WPF is to reuse what you already have, and change the look or extend the functionality via control templates and the dependency system. therefore, I have created a colour picker widget that uses only standard controls, and doesn't even change their control templates. Everything is accomplished via the use of attached properties, which are a very underrated tool in the WPF tookbox.


0 comments