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¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [ColorPicker](# class. |
Properties¶
| Name | Summary |
|---|---|
| Color | Gets or sets the currently selected color. |
| Red | Gets or sets the red component of the color (0-255). |
| Green | Gets or sets the green component of the color (0-255). |
| Blue | Gets or sets the blue component of the color (0-255). |
| Alpha | Gets or sets the alpha component of the color (0-255). |
| IsAlphaEnabled | Gets or sets a value indicating whether alpha channel editing is enabled. |
| HexValue | Gets the hex representation of the current color. |
Fields¶
| Name | Summary |
|---|---|
| static ColorProperty | Property for [Color](# |
| static RedProperty | Property for [Red](# |
| static GreenProperty | Property for [Green](# |
| static BlueProperty | Property for [Blue](# |
| static AlphaProperty | Property for [Alpha](# |
| static IsAlphaEnabledProperty | Property for [IsAlphaEnabled](# |
| static HexValueProperty | Property for [HexValue](# |
Methods¶
| Name | Summary |
|---|---|
| OnPropertyChanged | Called when a avalonia property changes on the object. |
| OnApplyTemplate | Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed. |