Class ActionGroup
ActionGroup UI element.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class ActionGroup : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement
Constructors
ActionGroup()
Default constructor.
Declaration
public ActionGroup()
Fields
compactUssClassName
The ActionGroup compact mode styling class.
Declaration
public const string compactUssClassName = "appui-actiongroup--compact"
Field Value
| Type | Description |
|---|---|
| string |
containerUssClassName
The ActionGroup container styling class.
Declaration
public const string containerUssClassName = "appui-actiongroup__container"
Field Value
| Type | Description |
|---|---|
| string |
justifiedUssClassName
The ActionGroup justified mode styling class.
Declaration
public const string justifiedUssClassName = "appui-actiongroup--justified"
Field Value
| Type | Description |
|---|---|
| string |
moreButtonUssClassName
The ActionGroup More Button styling class.
Declaration
public const string moreButtonUssClassName = "appui-actiongroup__more-button"
Field Value
| Type | Description |
|---|---|
| string |
quietUssClassName
The ActionGroup quiet mode styling class.
Declaration
public const string quietUssClassName = "appui-actiongroup--quiet"
Field Value
| Type | Description |
|---|---|
| string |
selectableUssClassName
The ActionGroup selectable mode styling class.
Declaration
public const string selectableUssClassName = "appui-actiongroup--selectable"
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The ActionGroup main styling class.
Declaration
public const string ussClassName = "appui-actiongroup"
Field Value
| Type | Description |
|---|---|
| string |
verticalUssClassName
The ActionGroup vertical mode styling class.
Declaration
public const string verticalUssClassName = "appui-actiongroup--"
Field Value
| Type | Description |
|---|---|
| string |
Properties
allowNoSelection
Whether the ActionGroup allows no selection when in single or multi selection mode.
Declaration
[Tooltip("Whether the ActionGroup allows no selection when in single or multi selection mode.")]
public bool allowNoSelection { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
closeOnSelection
Whether the ActionGroup's menu popover should close when a selection is made.
Declaration
[Tooltip("Whether the ActionGroup's menu popover should close when a selection is made.")]
public bool closeOnSelection { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
compact
The compact state of the ActionGroup.
Declaration
[Tooltip("The compact state of the ActionGroup. A compact ActionGroup doesn't have any gap between its items.")]
public bool compact { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
contentContainer
The content container of the ActionGroup.
Declaration
public override VisualElement contentContainer { get; }
Property Value
| Type | Description |
|---|---|
| VisualElement |
Overrides
direction
The orientation of the ActionGroup.
Declaration
public Direction direction { get; set; }
Property Value
| Type | Description |
|---|---|
| Direction |
getItemId
Callback used to get the ID of an item.
Declaration
public Func<int, int> getItemId { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<int, int> |
justified
The justified state of the ActionGroup.
Declaration
[Tooltip("The justified state of the ActionGroup. A justified ActionGroup has its items stretched to fill the available space.")]
public bool justified { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
quiet
The quiet state of the ActionGroup.
Declaration
[Tooltip("The quiet state of the ActionGroup. A quiet ActionGroup has no background and no border.")]
public bool quiet { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
selectedIds
The selected items.
Declaration
public IEnumerable<int> selectedIds { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<int> |
selectedIndices
The selected items.
Declaration
public IEnumerable<int> selectedIndices { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<int> |
selectionType
The selection type of the ActionGroup.
Declaration
[Tooltip("The selection type of the ActionGroup. A selection type of None means that no item can be selected. A selection type of Single means that only one item can be selected at a time. A selection type of Multiple means that multiple items can be selected at a time.")]
public SelectionType selectionType { get; set; }
Property Value
| Type | Description |
|---|---|
| SelectionType |
Methods
ClearSelection()
Deselects any selected items.
Declaration
public void ClearSelection()
ClearSelectionWithoutNotify()
Deselects any selected items without sending an event through the visual tree.
Declaration
public void ClearSelectionWithoutNotify()
GetDirectionUssClassName(Direction)
Declaration
public static string GetDirectionUssClassName(Direction enumValue)
Parameters
| Type | Name | Description |
|---|---|---|
| Direction | enumValue |
Returns
| Type | Description |
|---|---|
| string |
SetSelection(IEnumerable<int>)
Sets a collection of selected items.
Declaration
public void SetSelection(IEnumerable<int> indices)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<int> | indices | The collection of the indices of the items to be selected. |
SetSelectionWithoutNotify(IEnumerable<int>)
Sets a collection of selected items without triggering a selection change callback.
Declaration
public void SetSelectionWithoutNotify(IEnumerable<int> indices)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<int> | indices | The collection of items to be selected. |
Events
selectionChanged
Event sent when the selection changes.
Declaration
public event Action<IEnumerable<int>> selectionChanged
Event Type
| Type | Description |
|---|---|
| Action<IEnumerable<int>> |