docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
    Show / Hide Table of Contents
    • Unity​Engine.​Dt.​App.​Core
      • Application​Context
      • App​UI
      • App​UIManager
      • App​UIManager​Behaviour
      • App​UISettings
      • Color​Entry
      • Dismiss​Type
      • Handler
      • Haptic​Feedback​Type
      • Looper
      • Message
      • Notification​Duration
      • Platform
      • World​Space​UIDocument
    • Unity​Engine.​Dt.​App.​Editor
      • App​UIBuild​Setup
      • App​UISetup
      • Storybook
      • Story​Book​Boolean​Property
      • Story​Book​Component
      • Story​Book​Component​Property
      • Story​Book​Page
      • Story​Book​Story
      • Story​Book​String​Property
    • Unity​Engine.​Dt.​App.​UI
      • Accordion
      • Accordion​Item
      • Accordion​Item​Value​Changed​Event
      • Action​Bar
      • Action​Button
      • Action​Group
      • Action​Triggered​Event
      • Additional​Style
      • Alert​Dialog
      • Alert​Semantic
      • Anchor​Popup<T>
      • Animation​Description
      • Animation​Mode
      • Avatar
      • Badge
      • Base​Dialog
      • Base​Slider<TValue​Type>
      • Bottom​Notification<T>
      • Bounds​Field
      • Bounds​Int​Field
      • Breadcrumb​Item
      • Breadcrumbs
      • Breadcrumb​Separator
      • Button
      • Changing​Event<TValue​Type>
      • Checkbox
      • Checkbox​State
      • Chip
      • Chip.​Variant
      • Circular​Progress
      • Clickable
      • Color​Extensions
      • Color​Field
      • Color​Picker
      • Color​Picker.​Slider​Mode
      • Color​Slider
      • Color​Swatch
      • Color​Toolbar
      • Color​Wheel
      • Context​Provider
      • Dialog
      • Dialog​Trigger
      • Direction
      • Divider
      • Double​Field
      • Dpi​Changed​Event
      • Draggable
      • Drawer
      • Drawer​Anchor
      • Drawer​Variant
      • Dropdown
      • Ex​Visual​Element
      • Ex​Visual​Element.​Passes
      • Float​Field
      • Focus​Controller​Extensions
      • Header
      • Header​Size
      • Icon
      • Icon​Button
      • Icon​Size
      • IDismiss​Invocator
      • Inline​Value
      • INotify​Value​Changing<TValue​Type>
      • Input​Label
      • Int​Field
      • IPlaceable​Element
      • IPressable
      • ISelectable​Element
      • ISizeable​Element
      • IValidatable​Element<TValue​Type>
      • Keyboard​Focus​Controller
      • Key​Code​Extensions
      • Linear​Progress
      • Link
      • Localized​Text​Element
      • Long​Field
      • Mask
      • Menu
      • Menu​Builder
      • Menu​Divider
      • Menu​Item
      • Menu​Section
      • Menu​Trigger
      • Mobile​Popup​Presentation​Type
      • Modal
      • Modal​Full​Screen​Mode
      • Notification​Style
      • Notify​Value​Changing​Extensions
      • Numerical​Field<TValue​Type>
      • Page​Indicator
      • Page​View
      • Panel
      • Popover
      • Popover​Placement
      • Popup
      • Popup<T>
      • Popup​Presentation​Type
      • Position​Result
      • Preloader
      • Pressable
      • Progress
      • Progress.​Variant
      • Radio
      • Radio​Group
      • Rect​Extensions
      • Rect​Field
      • Rect​Int​Field
      • Scrollable
      • Search​Bar
      • Single​Extensions
      • Size
      • Slider​Base<TValue​Type>
      • Slider​Float
      • Slider​Int
      • Spacing
      • Split​View
      • Stack​View
      • Stack​View​Item
      • Stack​View​Item​Status
      • Stack​View​Operation
      • Stepper
      • Styles
      • Submittable
      • SVSquare
      • Swipe​View
      • Swipe​View​Item
      • Tab​Item
      • Tabs
      • Text
      • Text​Area
      • Text​Element​Extended​Uxml​Traits
      • Text​Field
      • Text​Field​Extensions
      • Text​Overflow
      • Text​Size
      • Toast
      • Toggle
      • Toolbar
      • Toolbar​Dock​Mode
      • Tooltip
      • Touch​Slider<TValue​Type>
      • Touch​Slider​Float
      • Touch​Slider​Int
      • Tray
      • Tray​Position
      • Value​Out​Of​Range​Exception
      • Vector2Field
      • Vector2Int​Field
      • Vector3Field
      • Vector3Int​Field
      • Vector4Field
      • Visual​Element​Extended​Uxml​Traits
      • Visual​Element​Extensions
      • Visual​Element​Not​Found​Exception
    • Scripting API
    • Unity​Engine.​Dt.​App.​UI
    • Stack​View

    Class StackView

    A StackView is a container that can contain multiple items. It is similar to a stack of cards. The items are added to the stack using the Push method. The top item is the current item. The current item can be removed using the Pop method. The item below the current item becomes the new current item. The current item can be replaced using the Replace method. The item below the current item is removed and the new item is added.

    Inheritance
    Object
    CallbackEventHandler
    Focusable
    VisualElement
    StackView
    Inherited Members
    VisualElement.disabledUssClassName
    UnityEngine.UIElements.VisualElement.ExecuteDefaultAction(UnityEngine.UIElements.EventBase)
    UnityEngine.UIElements.VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    UnityEngine.UIElements.VisualElement.SetEnabledFromHierarchy(System.Boolean)
    VisualElement.SetEnabled(Boolean)
    VisualElement.MarkDirtyRepaint()
    VisualElement.ContainsPoint(Vector2)
    UnityEngine.UIElements.VisualElement.Overlaps(UnityEngine.Rect)
    UnityEngine.UIElements.VisualElement.DoMeasure(System.Single, UnityEngine.UIElements.VisualElement.MeasureMode, System.Single, UnityEngine.UIElements.VisualElement.MeasureMode)
    UnityEngine.UIElements.VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(String)
    VisualElement.RemoveFromClassList(String)
    VisualElement.ToggleInClassList(String)
    VisualElement.EnableInClassList(String, Boolean)
    VisualElement.ClassListContains(String)
    VisualElement.FindAncestorUserData()
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(System.Single, System.Single, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, System.Single>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(UnityEngine.Rect, UnityEngine.Rect, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Rect>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(UnityEngine.Color, UnityEngine.Color, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Color>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(UnityEngine.Vector3, UnityEngine.Vector3, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Vector3>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(UnityEngine.Vector2, UnityEngine.Vector2, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Vector2>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(UnityEngine.Quaternion, UnityEngine.Quaternion, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Quaternion>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(UnityEngine.UIElements.Experimental.StyleValues, UnityEngine.UIElements.Experimental.StyleValues, System.Int32)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(System.Func<UnityEngine.UIElements.VisualElement, System.Single>, System.Single, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, System.Single>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(System.Func<UnityEngine.UIElements.VisualElement, UnityEngine.Rect>, UnityEngine.Rect, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Rect>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(System.Func<UnityEngine.UIElements.VisualElement, UnityEngine.Color>, UnityEngine.Color, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Color>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(System.Func<UnityEngine.UIElements.VisualElement, UnityEngine.Vector3>, UnityEngine.Vector3, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Vector3>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(System.Func<UnityEngine.UIElements.VisualElement, UnityEngine.Vector2>, UnityEngine.Vector2, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Vector2>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(System.Func<UnityEngine.UIElements.VisualElement, UnityEngine.Quaternion>, UnityEngine.Quaternion, System.Int32, System.Action<UnityEngine.UIElements.VisualElement, UnityEngine.Quaternion>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Start(UnityEngine.UIElements.Experimental.StyleValues, System.Int32)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Layout(UnityEngine.Rect, System.Int32)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.TopLeft(UnityEngine.Vector2, System.Int32)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Size(UnityEngine.Vector2, System.Int32)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Scale(System.Single, System.Int32)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Position(UnityEngine.Vector3, System.Int32)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.Experimental.ITransitionAnimations.Rotation(UnityEngine.Quaternion, System.Int32)
    VisualElement.Add(VisualElement)
    VisualElement.Insert(Int32, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(Int32)
    VisualElement.Clear()
    VisualElement.ElementAt(Int32)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    UnityEngine.UIElements.VisualElement.Sort(System.Comparison<UnityEngine.UIElements.VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    UnityEngine.UIElements.VisualElement.GetFirstOfType<T>()
    UnityEngine.UIElements.VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IVisualElementScheduler.Execute(System.Action<UnityEngine.UIElements.TimerState>)
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IVisualElementScheduler.Execute(System.Action)
    VisualElement.viewDataKey
    VisualElement.userData
    UnityEngine.UIElements.VisualElement.canGrabFocus
    UnityEngine.UIElements.VisualElement.focusController
    VisualElement.usageHints
    VisualElement.transform
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.ITransform.position
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.ITransform.rotation
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.ITransform.scale
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.ITransform.matrix
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.experimental
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IExperimentalFeatures.animation
    VisualElement.hierarchy
    UnityEngine.UIElements.VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.contentContainer
    VisualElement.visualTreeAssetSource
    UnityEngine.UIElements.VisualElement.Item[System.Int32]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    VisualElement.resolvedStyle
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.alignContent
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.alignItems
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.alignSelf
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.backgroundColor
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.backgroundImage
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderBottomColor
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderBottomLeftRadius
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderBottomRightRadius
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderBottomWidth
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderLeftColor
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderLeftWidth
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderRightColor
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderRightWidth
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderTopColor
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderTopLeftRadius
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderTopRightRadius
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.borderTopWidth
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.bottom
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.color
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.display
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.flexBasis
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.flexDirection
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.flexGrow
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.flexShrink
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.flexWrap
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.fontSize
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.height
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.justifyContent
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.left
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.letterSpacing
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.marginBottom
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.marginLeft
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.marginRight
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.marginTop
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.maxHeight
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.maxWidth
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.minHeight
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.minWidth
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.opacity
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.paddingBottom
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.paddingLeft
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.paddingRight
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.paddingTop
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.position
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.right
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.rotate
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.scale
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.textOverflow
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.top
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.transformOrigin
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.transitionDelay
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.transitionDuration
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.transitionProperty
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.transitionTimingFunction
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.translate
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityBackgroundImageTintColor
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityBackgroundScaleMode
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityFont
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityFontDefinition
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityFontStyleAndWeight
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityParagraphSpacing
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unitySliceBottom
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unitySliceLeft
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unitySliceRight
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unitySliceTop
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityTextAlign
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityTextOutlineColor
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityTextOutlineWidth
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.unityTextOverflowPosition
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.visibility
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.whiteSpace
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.width
    UnityEngine.UIElements.VisualElement.UnityEngine.UIElements.IResolvedStyle.wordSpacing
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    UnityEngine.UIElements.CallbackEventHandler.RegisterCallback<TEventType>(UnityEngine.UIElements.EventCallback<TEventType>, UnityEngine.UIElements.TrickleDown)
    UnityEngine.UIElements.CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(UnityEngine.UIElements.EventCallback<TEventType, TUserArgsType>, TUserArgsType, UnityEngine.UIElements.TrickleDown)
    UnityEngine.UIElements.CallbackEventHandler.UnregisterCallback<TEventType>(UnityEngine.UIElements.EventCallback<TEventType>, UnityEngine.UIElements.TrickleDown)
    UnityEngine.UIElements.CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(UnityEngine.UIElements.EventCallback<TEventType, TUserArgsType>, UnityEngine.UIElements.TrickleDown)
    CallbackEventHandler.HandleEvent(EventBase)
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Dt.App.UI
    Syntax
    public class StackView : VisualElement, IEventHandler, IStylePropertyAnimations, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle

    Constructors

    StackView()

    The constructor of the StackView.

    Declaration
    public StackView()

    Fields

    ussClassName

    The main styling class of the StackView. This is the class that is used in the USS file.

    Declaration
    public static readonly string ussClassName
    Field Value
    Type Description
    String

    Properties

    currentItem

    The current item in the stack.

    Declaration
    public StackViewItem currentItem { get; }
    Property Value
    Type Description
    StackViewItem

    depth

    The depth of the stack.

    Declaration
    public int depth { get; }
    Property Value
    Type Description
    Int32

    initialItem

    The initial item to add to the stack.

    Declaration
    public VisualElement initialItem { get; set; }
    Property Value
    Type Description
    VisualElement

    isBusy

    Check if the StackView has any active animation.

    Declaration
    public bool isBusy { get; }
    Property Value
    Type Description
    Boolean

    isEmpty

    Check if the stack is empty.

    Declaration
    public bool isEmpty { get; }
    Property Value
    Type Description
    Boolean

    popEnterAnimation

    The animation to use on the newly active item when an item is popped from the stack.

    Declaration
    public AnimationDescription popEnterAnimation { get; set; }
    Property Value
    Type Description
    AnimationDescription

    popExitAnimation

    The animation to use on the current item when it is popped from the stack.

    Declaration
    public AnimationDescription popExitAnimation { get; set; }
    Property Value
    Type Description
    AnimationDescription

    pushEnterAnimation

    The animation to use on the newly active item when it is pushed to the stack.

    Declaration
    public AnimationDescription pushEnterAnimation { get; set; }
    Property Value
    Type Description
    AnimationDescription

    pushExitAnimation

    The animation to use on the current item when a new item is pushed to the stack.

    Declaration
    public AnimationDescription pushExitAnimation { get; set; }
    Property Value
    Type Description
    AnimationDescription

    replaceEnterAnimation

    The animation to use on the newly active item when it is replaced in the stack.

    Declaration
    public AnimationDescription replaceEnterAnimation { get; set; }
    Property Value
    Type Description
    AnimationDescription

    replaceExitAnimation

    The animation to use on the current item when it is replaced in the stack.

    Declaration
    public AnimationDescription replaceExitAnimation { get; set; }
    Property Value
    Type Description
    AnimationDescription

    Methods

    ClearStack()

    Removes all items from the stack.

    Declaration
    public void ClearStack()

    Pop(StackViewItem, StackViewOperation)

    Pops one or more items off the stack.

    Declaration
    public StackViewItem Pop(StackViewItem item, StackViewOperation operation = StackViewOperation.PopTransition)
    Parameters
    Type Name Description
    StackViewItem item

    If the item argument is specified, all items down to (but not including) item will be popped. If item is null, all items down to (but not including) the first item is popped.

    StackViewOperation operation

    The type of transition to use during the process.

    Returns
    Type Description
    StackViewItem

    Returns the last item removed from the stack.

    Pop(StackViewOperation)

    Pops one or more items off the stack. Only the current item is popped.

    Declaration
    public StackViewItem Pop(StackViewOperation operation = StackViewOperation.PopTransition)
    Parameters
    Type Name Description
    StackViewOperation operation

    The type of transition to use during the process.

    Returns
    Type Description
    StackViewItem

    Returns the last item removed from the stack.

    Push(VisualElement, StackViewOperation)

    Pushes an item onto the stack using an optional operation.

    Declaration
    public StackViewItem Push(VisualElement item, StackViewOperation operation = StackViewOperation.PushTransition)
    Parameters
    Type Name Description
    VisualElement item
    StackViewOperation operation

    The type of transition to use during the process.

    Returns
    Type Description
    StackViewItem

    Returns the item that became current.

    Replace(StackViewItem, VisualElement, StackViewOperation)

    Replaces one or more items on the stack with the specified item and optional operation.

    Declaration
    public StackViewItem Replace(StackViewItem target, VisualElement item, StackViewOperation operation = StackViewOperation.ReplaceTransition)
    Parameters
    Type Name Description
    StackViewItem target

    If the target argument is specified, all items down to the target item will be replaced. If target is null, all items in the stack will be replaced. If not specified, only the top item will be replaced. If the target argument is specified, all items down to the target item will be replaced. If target is null, all items in the stack will be replaced. If not specified, only the top item will be replaced.

    VisualElement item

    The item that will be used as replacement.

    StackViewOperation operation

    The type of transition to use during the process.

    Returns
    Type Description
    StackViewItem

    Returns the item that became current.

    Extension Methods

    VisualElementExtensions.GetContext(VisualElement)
    VisualElementExtensions.GetChildren<T>(VisualElement, Boolean)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, PopoverPlacement)

    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • Constructors
      • StackView()
    • Fields
      • ussClassName
    • Properties
      • currentItem
      • depth
      • initialItem
      • isBusy
      • isEmpty
      • popEnterAnimation
      • popExitAnimation
      • pushEnterAnimation
      • pushExitAnimation
      • replaceEnterAnimation
      • replaceExitAnimation
    • Methods
      • ClearStack()
      • Pop(StackViewItem, StackViewOperation)
      • Pop(StackViewOperation)
      • Push(VisualElement, StackViewOperation)
      • Replace(StackViewItem, VisualElement, StackViewOperation)
    • Extension Methods
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023