Class PageContainer
This class represents a container for a page in a paginated view. It handles assigning content to the container and manages the active state of the contained page.
Inheritance
Namespace: TS.PageSlider
Assembly: .dll
Syntax
public class PageContainer : MonoBehaviour
Methods
AssignContent(RectTransform)
Assigns content (RectTransform) to this container. If no content is provided, it creates a new GameObject with a RectTransform and a PageView component. The assigned content is then parented to this container and its properties are set to ensure proper positioning and scaling.
Declaration
public void AssignContent(RectTransform content)
Parameters
| Type | Name | Description |
|---|---|---|
| RectTransform | content | The RectTransform representing the content to be assigned. |
ChangeActiveState(bool)
Calls the ChangeActiveState method on the contained PageView component with the provided active state.
Declaration
public void ChangeActiveState(bool active)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | active | True to set the page to active, False to set it to inactive. |
ChangingToActiveState()
Calls the ChangingToActiveState method on the contained PageView component, to signal a transition to an active state.
Declaration
public void ChangingToActiveState()
ChangingToInactiveState()
Calls the ChangingToInactiveState method on the contained PageView component, to signal a transition to an inactive state.
Declaration
public void ChangingToInactiveState()