Color legend plain property dependency property method event
A color wheel to pick a color from with a click. The hue goes around the center, the saturation grows from white at the center to the full color at the edge, and Brightness darkens the result.
ColorPicker derives from BaseElement and has its members too. The controls page shows it in context, with code and screenshots.
Names are colored by what they are: a plain property, a method, an event or a dependency property, which a style, a binding or an animation can set.
Properties
Brightness 馃爢
float 路 Scales the picked color, from 0 (black) to 1 (the palette鈥檚 color, the default). Values outside are clamped. Changing it recomputes SelectedColor from the picked spot.
GeneralMouseCursorsSet 馃爢
MouseCursorsSet 路 Static. The cursors of every element of this style type; null (the default) falls back to DefaultMouseCursorsSet.
GeneralStyle 馃爢
ColorPickerStyle 路 Static. The style of every element of this style type. It starts as a copy of the framework defaults; changing one of its properties updates every such element, a property it leaves unset takes its default.
MouseCursorsSet 馃爢
MouseCursorsSet 路 Read-only. The cursors the element shows: its override, else the set given to the control it is a part of, else its type鈥檚 general set, else DefaultMouseCursorsSet.
MouseCursorsSetOverride 馃爢
MouseCursorsSet 路 The cursors of this element only, passed on to its parts that have none of their own.
PointerStyle 馃爢
ImageStyle 路 The style of the pointer. Its Source replaces the ring the picker makes; the pointer is centered on the picked pixel at whatever size it gets.
SelectedColor 馃爢
Color 路 The picked color times Brightness, always opaque. It starts black. Setting it raises OnSelectedColorChanged but does not move the pointer.
StyleOverride 馃爢
ColorPickerStyle 路 A style for this element only, applied over the general style. Setting it to null takes its values back out.
Methods
ColorPicker() 馃爢
ColorPicker(string name = null) 路 Creates a color picker. The name is used by GetElementByName.
| Parameter | Type | Description |
|---|---|---|
name |
string |
The element鈥檚 Name, which GetElementByName finds it by. Default: null. |
Events
OnSelectedColorChanged 馃爢
(BaseElement sender, Color color) 路 SelectedColor changes: by a pick, a Brightness change, or from code.
| Parameter | Type | Description |
|---|---|---|
sender |
BaseElement |
The element that raised the event. |
color |
Color |
The new SelectedColor. |