Class ColorToolbar
A toolbar that contains a color swatch for the previous color, a color swatch for the current color, and an eye dropper button.
Implements
Inherited Members
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.TryGetBinding(BindingId, out Binding)
VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
CallbackEventHandler.NotifyPropertyChanged(in BindingId)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class ColorToolbar : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
Constructors
ColorToolbar()
Default constructor.
Declaration
public ColorToolbar()
Fields
currentColorSwatchUssClassName
The Uss class name of the current color swatch.
Declaration
public const string currentColorSwatchUssClassName = "appui-colortoolbar__currentcolorswatch"
Field Value
| Type | Description |
|---|---|
| string |
eyeDropperUssClassName
The Uss class name of the eye dropper button.
Declaration
public const string eyeDropperUssClassName = "appui-colortoolbar__eyedropper"
Field Value
| Type | Description |
|---|---|
| string |
previousColorSwatchUssClassName
The Uss class name of the previous color swatch.
Declaration
public const string previousColorSwatchUssClassName = "appui-colortoolbar__previouscolorswatch"
Field Value
| Type | Description |
|---|---|
| string |
swatchContainerUssClassName
The Uss class name of the swatch container.
Declaration
public const string swatchContainerUssClassName = "appui-colortoolbar__swatchcontainer"
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The main Uss class name of this element.
Declaration
public const string ussClassName = "appui-colortoolbar"
Field Value
| Type | Description |
|---|---|
| string |
Properties
currentColor
The current color swatch value.
Declaration
[CreateProperty]
public Color currentColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
eyeDropperButton
The eye dropper button.
Declaration
public ActionButton eyeDropperButton { get; }
Property Value
| Type | Description |
|---|---|
| ActionButton |
previousColor
The previous color swatch value.
Declaration
[CreateProperty]
public Color previousColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
previousColorSwatch
The previous color swatch.
Declaration
public ColorSwatch previousColorSwatch { get; }
Property Value
| Type | Description |
|---|---|
| ColorSwatch |
Events
previousColorSwatchClicked
The event that is invoked when the previous color swatch is clicked.
Declaration
public event Action previousColorSwatchClicked
Event Type
| Type | Description |
|---|---|
| Action |