Class ColorField
Color Field UI element.
Inheritance
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public class ColorField : ExVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<Color>, IValidatableElement<Color>, INotifyValueChanging<Color>, INotifyValueChanged<Color>, ISizeableElement, IPressable
Constructors
ColorField()
Default constructor.
Declaration
public ColorField()
Fields
colorSwatchUssClassName
The ColorField color swatch styling class.
Declaration
public static readonly string colorSwatchUssClassName
Field Value
Type | Description |
---|---|
string |
labelUssClassName
The ColorField label styling class.
Declaration
public static readonly string labelUssClassName
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The ColorField size styling class.
Declaration
public static readonly string sizeUssClassName
Field Value
Type | Description |
---|---|
string |
swatchOnlyUssClassName
The ColorField swatch only styling class.
Declaration
public static readonly string swatchOnlyUssClassName
Field Value
Type | Description |
---|---|
string |
ussClassName
The ColorField main styling class.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
string |
Properties
clickable
Clickable Manipulator for this AssetTargetField.
Declaration
public Pressable clickable { get; set; }
Property Value
Type | Description |
---|---|
Pressable |
contentContainer
The content container of this ColorField. This is null for ColorField.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
inlinePicker
The ColorPicker position relative to the ColorField. When this is true, the ColorPicker will be inlined instead of being displayed in a Popover.
Declaration
public bool inlinePicker { get; set; }
Property Value
Type | Description |
---|---|
bool |
invalid
The ColorField invalid state.
Declaration
public bool invalid { get; set; }
Property Value
Type | Description |
---|---|
bool |
size
The ColorField size.
Declaration
public Size size { get; set; }
Property Value
Type | Description |
---|---|
Size |
swatchOnly
The ColorField type. When this is true, the ColorField will only show the swatch.
Declaration
public bool swatchOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
validateValue
The ColorField validation function.
Declaration
public Func<Color, bool> validateValue { get; set; }
Property Value
Type | Description |
---|---|
Func<Color, bool> |
value
The ColorField value.
Declaration
public Color value { get; set; }
Property Value
Type | Description |
---|---|
Color |
Methods
SetValueWithoutNotify(Color)
Sets the ColorField value without notifying the ColorField.
Declaration
public void SetValueWithoutNotify(Color newValue)
Parameters
Type | Name | Description |
---|---|---|
Color | newValue | The new ColorField value. |