Guest User

Untitled

a guest
Dec 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. using System.Collections.ObjectModel;
  2. using System.Threading.Tasks;
  3. using VideoGameMusicApp.Models;
  4. using VideoGameMusicApp.Services;
  5.  
  6. namespace VideoGameMusicApp.ViewModels
  7. {
  8. public class CancionesViewModel : BaseViewModel
  9. {
  10. private ObservableCollection<Cancion> canciones;
  11.  
  12. public ObservableCollection<Cancion> Canciones
  13. {
  14. get { return canciones; }
  15. set
  16. {
  17. canciones = value;
  18. OnPropertyChanged();
  19. }
  20. }
  21.  
  22. public CancionesViewModel()
  23. {
  24. }
  25.  
  26. public async Task ObtenerCanciones()
  27. {
  28. IsLoading = false;
  29. Canciones = new ObservableCollection<Cancion>(await ServicioCanciones.ObtenerCanciones());
  30. IsLoading = true;
  31. }
  32. }
  33. }
Add Comment
Please, Sign In to add comment