docs.unity3d.com
    Show / Hide Table of Contents

    Class PageView

    A PageView is a container that displays a single child at a time and provides a UI to navigate between them. It is similar to a ScrollView but here children are snapped to the container's edges.

    Inheritance
    Object
    CallbackEventHandler
    Focusable
    VisualElement
    PageView
    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.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: Unity.AppUI.UI
    Syntax
    public class PageView : VisualElement, IEventHandler, IStylePropertyAnimations, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle

    Constructors

    PageView()

    Default constructor.

    Declaration
    public PageView()

    Fields

    pageIndicatorUssClassName

    The styling class applied to the PageIndicator.

    Declaration
    public static readonly string pageIndicatorUssClassName
    Field Value
    Type Description
    String

    swipeViewUssClassName

    The styling class applied to the SwipeView.

    Declaration
    public static readonly string swipeViewUssClassName
    Field Value
    Type Description
    String

    ussClassName

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

    Declaration
    public static readonly string ussClassName
    Field Value
    Type Description
    String

    variantUssClassName

    The styling class applied to the PageView depending on its direction.

    Declaration
    public static readonly string variantUssClassName
    Field Value
    Type Description
    String

    Properties

    autoPlayDuration

    The number of milliseconds between each automatic swipe.

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

    contentContainer

    The content container of the PageView.

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

    direction

    The orientation of the PageView.

    Declaration
    public Direction direction { get; set; }
    Property Value
    Type Description
    Direction

    skipAnimationThreshold

    A limit number of pages to keep animating the transition between pages.

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

    snapAnimationSpeed

    The speed of the animation when snapping to a page.

    Declaration
    public float snapAnimationSpeed { get; set; }
    Property Value
    Type Description
    Single

    visibilityCount

    The number of pages that are visible at the same time.

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

    wrap

    Whether the PageView should wrap around when reaching the end of the list.

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

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    VisualElementExtensions.GetContext(VisualElement)
    VisualElementExtensions.GetChildren<T>(VisualElement, Boolean)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, PopoverPlacement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.GetWorldBoundingBox(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)

    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
      • PageView()
    • Fields
      • pageIndicatorUssClassName
      • swipeViewUssClassName
      • ussClassName
      • variantUssClassName
    • Properties
      • autoPlayDuration
      • contentContainer
      • direction
      • skipAnimationThreshold
      • snapAnimationSpeed
      • visibilityCount
      • wrap
    • 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