Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
XamarinAdventCalendarApp: PublicationViewModel.cs (Refresh code)
public class PublicationViewModel : BaseViewModel
{
// properties and commands - code omitted
private bool _isRefreshing;
public bool IsRefreshing
{
get => _isRefreshing;
set { _isRefreshing = value; OnPropertyChanged(); }
}
public ICommand RefreshCommand { private set; get; }
public PublicationViewModel()
{
//.. constructor - code omitted
RefreshCommand = new Command(async () => await LoadPublications());
}
// methods - code omitted
async Task LoadPublications()
{
// code omitted
IsRefreshing = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.