HsbColorPicker Class
Represents a color picker control that allows for visual selection of hue, saturation, and brightness.
[TemplatePart(Name = "PART_Checkerboard", Type = typeof(Path))]
[TemplatePart(Name = "PART_RadialHuePicker", Type = typeof(RadialHuePicker))]
public class HsbColorPicker : PickerBase, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
- Inheritance:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control PickerBase Object
Constructors
HsbColorPicker()
Initializes an instance of the HsbColorPicker
class.
public HsbColorPicker()
Properties
A
Gets or sets the alpha transparency component (0 - 255) of the color.
public int A { get; set; }
Property Value
- System.Int32:
The alpha transparency component of the color.
Brightness
Gets or sets the HSB brightness component (0 - 1.0) of the color.
public double Brightness { get; set; }
Property Value
- System.Double:
The HSB brightness component (0 - 1.0) of the color.
ComparisonValue
Gets or sets the comparison color.
public Color ComparisonValue { get; set; }
Property Value
- System.Windows.Media.Color:
The comparison color.
Hue
Gets or sets the HSB hue component (0 - 359.00) of the color.
public double Hue { get; set; }
Property Value
- System.Double:
The HSB hue component (0 - 359.00) of the color.
IsComparisonValueVisible
Gets or sets a value indicating whether the comparison value is visible.
public bool IsComparisonValueVisible { get; set; }
Property Value
- System.Boolean:
true
if the comparison value is visible; otherwisefalse
. The default value isfalse
.
Saturation
Gets or sets the HSB saturation component (0 - 1.0) of the color.
public double Saturation { get; set; }
Property Value
- System.Double:
The HSB saturation component (0 - 1.0) of the color.
Methods
OnApplyTemplate()
Invoked whenever application code or internal processes call ApplyTemplate
.
public override void OnApplyTemplate()
Events
BrightnessChanged
Occurs after the Brightness property value changes.
public event EventHandler BrightnessChanged
Event Type
- System.EventHandler
HueChanged
Occurs after the Hue property value changes.
public event EventHandler HueChanged
Event Type
- System.EventHandler
SaturationChanged
Occurs after the Saturation property value changes.
public event EventHandler SaturationChanged
Event Type
- System.EventHandler
Fields
AProperty
Identifies the A dependency property. This field is read-only.
public static readonly DependencyProperty AProperty
BrightnessProperty
Identifies the Brightness dependency property. This field is read-only.
public static readonly DependencyProperty BrightnessProperty
ComparisonValueProperty
Identifies the ComparisonValue dependency property. This field is read-only.
public static readonly DependencyProperty ComparisonValueProperty
HueProperty
Identifies the Hue dependency property. This field is read-only.
public static readonly DependencyProperty HueProperty
IsComparisonValueVisibleProperty
Identifies the IsComparisonValueVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsComparisonValueVisibleProperty
SaturationProperty
Identifies the Saturation dependency property. This field is read-only.
public static readonly DependencyProperty SaturationProperty
Inherited Members
- PickerBase.OnCreateAutomationPeer()
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()