CollectionLayout
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
IsFixedGeometry
Whether the collection uses the visible-only fixed geometry layout.
Set by
FixedGrid. All other factories return false.
Type: bool
ItemAspectRatio
Item width divided by item height for a grid, or null to measure the item template.
The sizing item's explicit height and minimum or maximum height constrain the derived row height.
Type: double?
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.
FixedGrid
A grid with fixed geometry that reads only the visible sections.
SkeleKit measures the item template, the section header template, and the section footer template one time at each geometry build. All sections use the measured sizes. Use this layout with a virtualized source for a large or computed list. Use
Gridfor self-sizing items.
| Parameter | Summary |
|---|---|
int columns | The number of columns per row. |
(optional) double spacing | The gap between items, in points. |
(optional) double? itemAspectRatio | The item width divided by its height, or null to measure the first item template. |
Returns
CollectionLayout: The fixed grid 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. |
(optional) double? itemAspectRatio | The item width divided by its height, or null to measure the item template. |
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.