I created a form with listview and ISingleOperation fo data refresh.
Then i created command in ViewModel.
public IRelayCommand LoadInvoicesCommand
{
get
{
return GetCommand(() => Execution.ViewModelExecute(new LoadInvoicesOperation(_model), 10000));
}
}
ISingleOperation works well and returns
new Result() { ResultAction = ResultType.None };
Refresh operation is bound well
RefreshCommand="{Binding LoadInvoicesCommand}"
But refresh indicator "hangs" and not disapearing, what is wrong here?
You need to bind a second property from the
ListView
named IsRefreshing to your ViewModel. This is a boolean property and is the one responsible to tell theListView
that the refreshing has started/completed.An example of a ListView XAML
Your ViewModel will need a public property called
IsRefreshing
and you will need to set this tofalse
when you the refresh command has completed.