Refresh Container
The refresh container allows a user to pull down on content or a list of data to refresh the content or retrieve more data. The refresh progress is indicated by a RefreshVisualizer that appears from the edge by which the pull gesture was initiated. The content of a RefreshContainer must be a ScrollViewer, or a control that has one.
Example
This example shows hows to use a RefreshContainer with a
In the axaml file.
<RefreshContainer PullDirection="TopToBottom"
RefreshRequested="RefreshContainerPage_RefreshRequested">
<ListBox ItemsSource="{Binding Items}"/>
</RefreshContainer>
In the class file.
private void RefreshContainerPage_RefreshRequested(object? sender, RefreshRequestedEventArgs e)
{
// Retrieve a deferral object.
var deferral = e.GetDeferral();
// Refresh List Box Items
// Notify the Refresh Container that the refresh is complete.
deferral.Complete();
}