RefreshVIew
Basic example
View.RefreshView(
View.ListView([
View.TextCell("First item")
View.TextCell("Second item")
View.TextCell("Third item")
])
)
Basic example with styling
View.RefreshView(
horizontalOptions = style.Position,
verticalOptions = style.Position,
backgroundColor = style.LayoutColor,
padding = style.Padding,
content =
View.ListView(
horizontalOptions = style.Position,
verticalOptions = style.Position,
backgroundColor = style.ViewColor,
items = [
View.TextCell("First item")
View.TextCell("Second item")
View.TextCell("Third item")
]
)
)
See also:
More examples
The RefreshView is a container control that provides pull to refresh functionality for scrollable content. Therefore, the child of a RefreshView must be a scrollable control, such as ScrollView, CollectionView, or ListView.
View.RefreshView(
View.ScrollView(
View.BoxView(
height = 150.,
width = 150.,
color = if model.IsRefreshing then Color.Red else Color.Blue
)
),
isRefreshing = model.IsRefreshing,
refreshing = (fun () -> dispatch Refresh)
)