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: Unity.AppUI.dll
Syntax
public class FloatingActionButton : ExVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, 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 const string accentUssClassName = "appui-fab--accent"
Field Value
Type | Description |
---|---|
string |
elevationUssClassName
The Floating Action Button's elevation USS class name.
Declaration
public const string elevationUssClassName = "appui-elevation-"
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The Floating Action Button's size USS class name.
Declaration
public const string sizeUssClassName = "appui-fab--size-"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Floating Action Button's USS class name.
Declaration
public const string ussClassName = "appui-fab"
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 |
Methods
GetSizeUssClassName(Size)
Declaration
public static string GetSizeUssClassName(Size enumValue)
Parameters
Type | Name | Description |
---|---|---|
Size | enumValue |
Returns
Type | Description |
---|---|
string |
Events
clicked
Event fired when the button is clicked.
Declaration
public event Action clicked
Event Type
Type | Description |
---|---|
Action |