CollectionLayout
The layout of a
CollectionView: a list, a grid, or a carousel.- Kind: Struct
- Namespace: SkeleKit
Properties
Columns
Columns per row, for a grid.
Type: int
Grouped
Whether a list uses the native inset-grouped style.
Type: bool
ItemWidth
Item width for a carousel, in points.
Type: double
Kind
Which arrangement this is.
Type: CollectionLayoutKind
Snap
How a carousel settles when the drag ends.
Type: CarouselSnap
Spacing
Gap between items, in points.
Type: double
Methods
Carousel
A horizontally scrolling row of fixed-width items, optionally snapping as it settles.
| Parameter | Summary |
|---|---|
double itemWidth | The width of each item, in points. |
(optional) double spacing | The gap between items, in points. |
(optional) CarouselSnap snap | How scrolling settles when the drag ends. |
Returns
CollectionLayout: The carousel layout.
Grid
A grid of equal columns.
| Parameter | Summary |
|---|---|
int columns | The number of columns per row. |
(optional) double spacing | The gap between items, in points. |
Returns
CollectionLayout: The grid layout.
List
A list of full-width rows; grouped uses the native inset-grouped style.
| Parameter | Summary |
|---|---|
(optional) bool grouped | Whether to use the native inset-grouped style. |
Returns
CollectionLayout: The list layout.