Class IconButton
IconButton UI element.
Inheritance
IconButton
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public class IconButton : ExVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, ISizeableElement, IPressable
Constructors
IconButton()
Default constructor.
Declaration
public IconButton()
IconButton(string, Action)
Construct an IconButton with a given icon.
Declaration
public IconButton(string iconName, Action clickEvent = null)
Parameters
Type | Name | Description |
---|---|---|
string | iconName | The name of the icon. |
Action | clickEvent | The click event callback. |
Fields
containerUssClassName
The IconButton leading container styling class.
Declaration
public static readonly string containerUssClassName
Field Value
Type | Description |
---|---|
string |
iconUssClassName
The IconButton leading icon styling class.
Declaration
public static readonly string iconUssClassName
Field Value
Type | Description |
---|---|
string |
primaryUssClassName
The IconButton primary variant styling class.
Declaration
public static readonly string primaryUssClassName
Field Value
Type | Description |
---|---|
string |
quietUssClassName
The IconButton quiet mode styling class.
Declaration
public static readonly string quietUssClassName
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The IconButton size styling class.
Declaration
public static readonly string sizeUssClassName
Field Value
Type | Description |
---|---|
string |
ussClassName
The IconButton main styling class.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
string |
Properties
clickable
Clickable Manipulator for this Button.
Declaration
public Pressable clickable { get; set; }
Property Value
Type | Description |
---|---|
Pressable |
icon
The IconButton icon.
Declaration
public string icon { get; set; }
Property Value
Type | Description |
---|---|
string |
primary
Use the primary variant of the Button.
Declaration
public bool primary { get; set; }
Property Value
Type | Description |
---|---|
bool |
quiet
The quiet state of the Button.
Declaration
public bool quiet { get; set; }
Property Value
Type | Description |
---|---|
bool |
size
The Button size.
Declaration
public Size size { get; set; }
Property Value
Type | Description |
---|---|
Size |
variant
The IconButton icon variant.
Declaration
public IconVariant variant { get; set; }
Property Value
Type | Description |
---|---|
IconVariant |
Events
clicked
Event triggered when the Button has been clicked.
Declaration
public event Action clicked
Event Type
Type | Description |
---|---|
Action |