Class AppBar
AppBar is a component that can be used to display a title, a back button, a drawer button and a set of actions.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public class AppBar : ExVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle
Constructors
Name | Description |
---|---|
AppBar() | Creates a new AppBar. |
Fields
Name | Description |
---|---|
actionContainerUssClassName | USS class name of the AppBar's action container. |
backButtonUssClassName | USS class name of the AppBar's back button. |
barUssClassName | USS class name of the AppBar's bar. |
bottomBorderUssClassName | USS class name of the AppBar's bottom border element. |
bottomUssClassName | USS class name of the AppBar's bottom element. |
compactTitleUssClassName | USS class name of the AppBar's compact title. |
compactUssClassName | USS class name of the AppBar's compact variant. |
drawerButtonUssClassName | USS class name of the AppBar's drawer button. |
flexibleSpaceUssClassName | USS class name of the AppBar's flexible space. |
largeTitleUssClassName | USS class name of the AppBar's large title. |
stretchUssClassName | USS class name of the AppBar's stretch variant. |
ussClassName | Main USS class name of the AppBar. |
Properties
Name | Description |
---|---|
bottom | Container element for the AppBar's bottom element. This element is located below the flexible space. |
compact | The compactness of the AppBar. Set to true to make it compact. Set to false to use the default size. |
contentContainer | The content container of this element. |
elevation | The elevation of the AppBar. |
expandedHeight | The height of the AppBar when it is expanded. See stretch. |
flexibleSpace | The flexible space element. |
scrollOffset | Set this value based on the scrollview's scrollOffset in order to stretch the AppBar accordingly. |
showBackButton | Display or hide the AppBar's back button. |
showDrawerButton | Display or hide the AppBar's drawer button. |
stretch | The stretch of the AppBar. Set to true to make it stretchable. Set to false to make it fixed. |
title | The AppBar's title. |
Methods
Name | Description |
---|---|
AddAction(VisualElement) | Add a new action to the AppBar. |
Events
Name | Description |
---|---|
backButtonTriggered | Event triggered when the AppBar's back button is pressed. |
drawerButtonTriggered | Event triggered when the AppBar's drawer button is pressed. |
stretchTriggered | Event triggered when the AppBar is being stretched. The float parameter is the stretch ratio (0.0 to 1.0). |