Class ActionButton
ActionButton UI element.
Inheritance
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class ActionButton : ExVisualElement, IEventHandler, IVisualElementScheduler, IExperimentalFeatures, ITransitionAnimations, ITransform, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, ISizeableElement, ISelectableElement, IPressable
Constructors
ActionButton()
Default constructor.
Declaration
public ActionButton()
ActionButton(Action)
Construct a ActionButton with a given click event callback.
Declaration
public ActionButton(Action clickEvent)
Parameters
Type | Name | Description |
---|---|---|
Action | clickEvent | THe given click event callback. |
Fields
accentUssClassName
The ActionButton accent styling class.
Declaration
public const string accentUssClassName = "appui-actionbutton--accent"
Field Value
Type | Description |
---|---|
string |
iconAndLabelUssClassName
The ActionButton icon and label variant styling class.
Declaration
public const string iconAndLabelUssClassName = "appui-actionbutton--icon-and-label"
Field Value
Type | Description |
---|---|
string |
iconOnlyUssClassName
The ActionButton icon only variant styling class.
Declaration
public const string iconOnlyUssClassName = "appui-actionbutton--icon-only"
Field Value
Type | Description |
---|---|
string |
iconUssClassName
The ActionButton icon styling class.
Declaration
public const string iconUssClassName = "appui-actionbutton__icon"
Field Value
Type | Description |
---|---|
string |
labelUssClassName
The ActionButton label styling class.
Declaration
public const string labelUssClassName = "appui-actionbutton__label"
Field Value
Type | Description |
---|---|
string |
quietUssClassName
The ActionButton quiet variant styling class.
Declaration
public const string quietUssClassName = "appui-actionbutton--quiet"
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The ActionButton size styling class.
Declaration
public const string sizeUssClassName = "appui-actionbutton--size-"
Field Value
Type | Description |
---|---|
string |
trailingIconUssClassName
The ActionButton trailing icon styling class.
Declaration
public const string trailingIconUssClassName = "appui-actionbutton__trailing-icon"
Field Value
Type | Description |
---|---|
string |
ussClassName
The ActionButton main styling class.
Declaration
public const string ussClassName = "appui-actionbutton"
Field Value
Type | Description |
---|---|
string |
withTrailingIconUSsClassName
The ActionButton with trailing icon variant styling class.
Declaration
public const string withTrailingIconUSsClassName = "appui-actionbutton--with-trailing-icon"
Field Value
Type | Description |
---|---|
string |
Properties
accent
The accent variant of the ActionButton.
Declaration
[Tooltip("The accent variant of the ActionButton")]
public bool accent { get; set; }
Property Value
Type | Description |
---|---|
bool |
clickable
Clickable Manipulator for this ActionButton.
Declaration
public Pressable clickable { get; set; }
Property Value
Type | Description |
---|---|
Pressable |
contentContainer
The content container of the ActionButton.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
icon
The ActionButton icon.
Declaration
[Tooltip("The ActionButton icon.")]
public string icon { get; set; }
Property Value
Type | Description |
---|---|
string |
iconVariant
The ActionButton icon variant.
Declaration
[Tooltip("The ActionButton icon variant.")]
public IconVariant iconVariant { get; set; }
Property Value
Type | Description |
---|---|
IconVariant |
label
The ActionButton label.
Declaration
[Tooltip("The ActionButton label.")]
public string label { get; set; }
Property Value
Type | Description |
---|---|
string |
quiet
The quiet state of the ActionButton.
Declaration
[Tooltip("The quiet state of the ActionButton")]
public bool quiet { get; set; }
Property Value
Type | Description |
---|---|
bool |
selected
The selected state of the ActionButton.
Declaration
[Tooltip("The selected state of the ActionButton")]
public bool selected { get; set; }
Property Value
Type | Description |
---|---|
bool |
size
The current size of the ActionButton.
Declaration
[Tooltip("The current size of the ActionButton.")]
public Size size { get; set; }
Property Value
Type | Description |
---|---|
Size |
trailingIcon
The ActionButton trailing icon.
Declaration
public string trailingIcon { get; set; }
Property Value
Type | Description |
---|---|
string |
trailingIconVariant
The ActionButton trailing icon variant.
Declaration
[Tooltip("The ActionButton trailing icon variant.")]
public IconVariant trailingIconVariant { get; set; }
Property Value
Type | Description |
---|---|
IconVariant |
Methods
GetSizeUssClassName(Size)
Declaration
public static string GetSizeUssClassName(Size enumValue)
Parameters
Type | Name | Description |
---|---|---|
Size | enumValue |
Returns
Type | Description |
---|---|
string |
SetSelectedWithoutNotify(bool)
Set the selected state of the ActionButton without notifying the click event.
Declaration
public void SetSelectedWithoutNotify(bool newValue)
Parameters
Type | Name | Description |
---|---|---|
bool | newValue | The new selected state. |
Events
clicked
The ActionButton click event.
Declaration
public event Action clicked
Event Type
Type | Description |
---|---|
Action |