docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PropertyGroup

    A collapsible group of inspector rows.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    PropertyGroup
    Implements
    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder
    Inherited Members
    BaseVisualElement.contextPrefix
    BaseVisualElement.densityOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.SetActivePseudoState(bool)
    VisualElement.SetCheckedPseudoState(bool)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.IsMarkedForRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.SetBinding(BindingId, Binding)
    VisualElement.GetBinding(BindingId)
    VisualElement.TryGetBinding(BindingId, out Binding)
    VisualElement.GetBindingInfos()
    VisualElement.GetBindingInfos(List<BindingInfo>)
    VisualElement.HasBinding(BindingId)
    VisualElement.ClearBinding(BindingId)
    VisualElement.ClearBindings()
    VisualElement.GetHierarchicalDataSourceContext()
    VisualElement.GetDataSourceContext(BindingId)
    VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
    VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
    VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.disablePlayModeTint
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.scaledPixelsPerPoint
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.hasActivePseudoState
    VisualElement.hasInactivePseudoState
    VisualElement.hasHoverPseudoState
    VisualElement.hasCheckedPseudoState
    VisualElement.hasEnabledPseudoState
    VisualElement.hasDisabledPseudoState
    VisualElement.hasFocusPseudoState
    VisualElement.hasRootPseudoState
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.languageDirection
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.dataSource
    VisualElement.dataSourcePath
    VisualElement.dataSourceType
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.resolvedStyle
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
    CallbackEventHandler.UnregisterAllRemovableCallbacks()
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    CallbackEventHandler.HandleEventBubbleUp(EventBase)
    CallbackEventHandler.HandleEventTrickleDown(EventBase)
    CallbackEventHandler.ExecuteDefaultAction(EventBase)
    CallbackEventHandler.NotifyPropertyChanged(in BindingId)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    [UxmlElement]
    public class PropertyGroup : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
    Remarks

    The title sits on the text line with no caret, which is what keeps a column of groups reading as text rather than as a tree; a closed group that has something in it shows an ellipsis after its label instead. Rows inside are --appui-alias-inspector-row-gap apart, so a stack of InputLabel rows in Grid keeps one rhythm across groups.

    An empty group is not a disclosure: it has nothing to expand, so its header is disabled and shows no ellipsis rather than claiming to be open. A group whose rows are laid out elsewhere sets expandable to keep its toggle. Use PropertyGroupStack for the column a panel stacks its sections in.

    This is not an AccordionItem: an accordion is a list of disclosures with carets, one of which is open, while a property group is a titled span of an inspector that happens to fold away.

    Examples

    A section with a nested sub-group of rows.

    <appui:PropertyGroupStack>
        <appui:PropertyGroup label="Transform" level="Section">
            <appui:InputLabel label="Position" row-layout="Grid">
                <appui:Vector3Field />
            </appui:InputLabel>
            <appui:PropertyGroup label="Advanced">
                <appui:InputLabel label="Static" row-layout="Grid">
                    <appui:Checkbox />
                </appui:InputLabel>
            </appui:PropertyGroup>
        </appui:PropertyGroup>
    </appui:PropertyGroupStack>

    Constructors

    PropertyGroup()

    Initializes a new instance of the PropertyGroup class.

    Declaration
    public PropertyGroup()

    Fields

    contentUssClassName

    The styling class of the PropertyGroup's content.

    Declaration
    public const string contentUssClassName = "appui-property-group__content"
    Field Value
    Type Description
    string

    ellipsisUssClassName

    The styling class of the ellipsis a closed PropertyGroup shows after its label.

    Declaration
    public const string ellipsisUssClassName = "appui-property-group__ellipsis"
    Field Value
    Type Description
    string

    emptyUssClassName

    The PropertyGroup styling class applied while it has nothing to show.

    Declaration
    public const string emptyUssClassName = "appui-property-group--empty"
    Field Value
    Type Description
    string

    headerUssClassName

    The styling class of the PropertyGroup's header row, which holds the toggle and the trailing slot.

    Declaration
    public const string headerUssClassName = "appui-property-group__header"
    Field Value
    Type Description
    string

    labelUssClassName

    The styling class of the PropertyGroup's label.

    Declaration
    public const string labelUssClassName = "appui-property-group__label"
    Field Value
    Type Description
    string

    levelUssClassName

    The PropertyGroup level styling class.

    Declaration
    public const string levelUssClassName = "appui-property-group--level-"
    Field Value
    Type Description
    string

    openUssClassName

    The PropertyGroup styling class applied while it is open.

    Declaration
    public const string openUssClassName = "appui-property-group--open"
    Field Value
    Type Description
    string

    toggleUssClassName

    The styling class of the PropertyGroup's header toggle.

    Declaration
    public const string toggleUssClassName = "appui-property-group__toggle"
    Field Value
    Type Description
    string

    trailingContainerUssClassName

    The styling class of the PropertyGroup's trailing slot.

    Declaration
    public const string trailingContainerUssClassName = "appui-property-group__trailing-container"
    Field Value
    Type Description
    string

    ussClassName

    The PropertyGroup main styling class.

    Declaration
    public const string ussClassName = "appui-property-group"
    Field Value
    Type Description
    string

    withTrailingUssClassName

    The PropertyGroup styling class applied while it has trailing content beside its title.

    Declaration
    public const string withTrailingUssClassName = "appui-property-group--with-trailing"
    Field Value
    Type Description
    string

    withoutRowsUssClassName

    The PropertyGroup styling class applied while it has no rows of its own, whether or not it is expandable. Its content then takes no space below the header.

    Declaration
    public const string withoutRowsUssClassName = "appui-property-group--without-rows"
    Field Value
    Type Description
    string

    Properties

    clickable

    The Pressable manipulator of the header toggle.

    Declaration
    [CreateProperty]
    public Pressable clickable { get; set; }
    Property Value
    Type Description
    Pressable

    contentContainer

    Logical container where child elements are added. If a child is added to this element, the child is added to this element's content container instead.

    Declaration
    public override VisualElement contentContainer { get; }
    Property Value
    Type Description
    VisualElement
    Overrides
    VisualElement.contentContainer

    expandable

    Whether the group has content laid out elsewhere, rows another element places (a timeline's gutter, say), so its header toggles and shows the closed-state ellipsis without children of its own. Without it a group toggles only while it has children. False by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool expandable { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The group only reports the state through open and openChanged; showing and hiding the rows it stands for is the host's job.

    hasContent

    Whether the group has anything to show: children of its own, or expandable content laid out elsewhere.

    Declaration
    public bool hasContent { get; }
    Property Value
    Type Description
    bool

    headerElement

    The header row, holding the toggle and the trailing slot. Exposed for a host that wants to mark it as a drop target.

    Declaration
    public VisualElement headerElement { get; }
    Property Value
    Type Description
    VisualElement

    label

    The group's title.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string label { get; set; }
    Property Value
    Type Description
    string

    level

    How prominent the group is: a top-level Section or a nested Sub group.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public PropertyGroupLevel level { get; set; }
    Property Value
    Type Description
    PropertyGroupLevel

    open

    Whether the group is showing its rows. Open by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool open { get; set; }
    Property Value
    Type Description
    bool

    toggleElement

    The header toggle: the press target that folds the group. Exposed for a host's own hit-testing.

    Declaration
    public VisualElement toggleElement { get; }
    Property Value
    Type Description
    VisualElement

    trailingContainer

    The slot at the end of the header line, outside the toggle. Content added here does not inherit the toggle's press target, so a control in it can be clicked without folding the group.

    Declaration
    public VisualElement trailingContainer { get; }
    Property Value
    Type Description
    VisualElement
    Remarks

    Call RefreshTrailing() after adding to or removing from it if the state is needed before the next layout pass.

    Methods

    GetLevelUssClassName(PropertyGroupLevel)

    Declaration
    public static string GetLevelUssClassName(PropertyGroupLevel enumValue)
    Parameters
    Type Name Description
    PropertyGroupLevel enumValue
    Returns
    Type Description
    string

    RefreshTrailing()

    Re-reads whether the group has content and whether it has a trailing slot.

    Declaration
    public void RefreshTrailing()
    Remarks

    This runs on every layout pass of either. Call it directly only after mutating them when the state is needed before the next pass.

    SetOpenWithoutNotify(bool)

    Sets the open state without raising openChanged.

    Declaration
    public void SetOpenWithoutNotify(bool newValue)
    Parameters
    Type Name Description
    bool newValue

    The new open state.

    Toggle()

    Folds the group if it is open, unfolds it otherwise.

    Declaration
    public void Toggle()

    Events

    openChanged

    Event raised when the group has been folded or unfolded, with the new state.

    Declaration
    public event Action<bool> openChanged
    Event Type
    Type Description
    Action<bool>

    Implements

    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    RegisterUpdateCallbackExtensions.RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    RegisterUpdateCallbackExtensions.UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    VisualElementExtensions.EnableDynamicTransform(VisualElement, bool)
    VisualElementExtensions.EnablePicking(VisualElement, bool)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement, string)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement, string)
    VisualElementExtensions.GetExclusiveRootElement(VisualElement)
    VisualElementExtensions.GetLastAncestorOfType<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement, string)
    VisualElementExtensions.GetTooltipContent(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.HasAncestorOfType<T>(VisualElement, bool)
    VisualElementExtensions.HasAncestorsOfType<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement, string)
    VisualElementExtensions.IsInvisible(VisualElement)
    VisualElementExtensions.IsOnScreen(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, string, T)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipContent(VisualElement, VisualElementExtensions.TooltipContentCallback)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)