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.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class PageView : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
PageView()
Default constructor.
Declaration
public PageView()
Fields
pageIndicatorUssClassName
The styling class applied to the PageIndicator.
Declaration
public const string pageIndicatorUssClassName = "appui-pageview__page-indicator"
Field Value
Type | Description |
---|---|
string |
swipeViewUssClassName
The styling class applied to the SwipeView.
Declaration
public const string swipeViewUssClassName = "appui-pageview__swipeview"
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 const string ussClassName = "appui-pageview"
Field Value
Type | Description |
---|---|
string |
variantUssClassName
The styling class applied to the PageView depending on its direction.
Declaration
public const string variantUssClassName = "appui-pageview--"
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 |
---|---|
int |
contentContainer
The content container of the PageView.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
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 |
---|---|
int |
snapAnimationSpeed
The speed of the animation when snapping to a page.
Declaration
public float snapAnimationSpeed { get; set; }
Property Value
Type | Description |
---|---|
float |
visibilityCount
The number of pages that are visible at the same time.
Declaration
public int visibilityCount { get; set; }
Property Value
Type | Description |
---|---|
int |
wrap
Whether the PageView should wrap around when reaching the end of the list.
Declaration
public bool wrap { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
GetDirectionUssClassName(Direction)
Declaration
public static string GetDirectionUssClassName(Direction enumValue)
Parameters
Type | Name | Description |
---|---|---|
Direction | enumValue |
Returns
Type | Description |
---|---|
string |