Last active
December 6, 2019 13:41
-
-
Save icebeam7/7df81ad1b015a9c13fcefee19baddbca to your computer and use it in GitHub Desktop.
XamarinAdventCalendarApp: PublicationViewModel.cs (Refresh code)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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