Skip to content

ColorPicker class

Defined in

Namespace: CrissCross.Avalonia.UI.Controls Assembly: CrissCross.Avalonia.UI.dll Full name: CrissCross.Avalonia.UI.Controls.ColorPicker Modifiers: public

Summary

        Represents a control that lets a user pick a color using sliders and a color preview.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Class hierarchy
classDiagram
class ColorPicker
class TemplatedControl
TemplatedControl <|-- ColorPicker

Inherits from: TemplatedControl

Constructors

NameSummary
.ctorInitializes a new instance of the [ColorPicker](# class.

Properties

NameSummary
ColorGets or sets the currently selected color.
RedGets or sets the red component of the color (0-255).
GreenGets or sets the green component of the color (0-255).
BlueGets or sets the blue component of the color (0-255).
AlphaGets or sets the alpha component of the color (0-255).
IsAlphaEnabledGets or sets a value indicating whether alpha channel editing is enabled.
HexValueGets the hex representation of the current color.

Fields

NameSummary
static ColorPropertyProperty for [Color](#
static RedPropertyProperty for [Red](#
static GreenPropertyProperty for [Green](#
static BluePropertyProperty for [Blue](#
static AlphaPropertyProperty for [Alpha](#
static IsAlphaEnabledPropertyProperty for [IsAlphaEnabled](#
static HexValuePropertyProperty for [HexValue](#

Methods

NameSummary
OnPropertyChangedCalled when a avalonia property changes on the object.
OnApplyTemplateCalled when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
Inherited members