Class FloatingActionButton
A floating action button.
Inheritance
FloatingActionButton
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 FloatingActionButton : ExVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IPressable
Constructors
FloatingActionButton()
Default constructor.
Declaration
public FloatingActionButton()
FloatingActionButton(Action)
Default constructor.
Declaration
public FloatingActionButton(Action clickAction)
Parameters
Type | Name | Description |
---|---|---|
Action | clickAction | The action to perform when the button is clicked. |
Fields
accentUssClassName
The Floating Action Button's accent USS class name.
Declaration
public static readonly string accentUssClassName
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The Floating Action Button's size USS class name.
Declaration
public static readonly string sizeUssClassName
Field Value
Type | Description |
---|---|
string |
ussClassName
The Floating Action Button's USS class name.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
string |
Properties
accent
The accent variant of this element.
Declaration
public bool accent { get; set; }
Property Value
Type | Description |
---|---|
bool |
clickable
The clickable manipulator used by this button.
Declaration
public Pressable clickable { get; }
Property Value
Type | Description |
---|---|
Pressable |
contentContainer
The content container of this element.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
elevation
The elevation of this element.
Declaration
public int elevation { get; set; }
Property Value
Type | Description |
---|---|
int |
size
The size of this element.
Declaration
public Size size { get; set; }
Property Value
Type | Description |
---|---|
Size |
Events
clicked
Event fired when the button is clicked.
Declaration
public event Action clicked
Event Type
Type | Description |
---|---|
Action |