Last active
December 16, 2018 13:48
-
-
Save icebeam7/d3acd09ab907481360321d54c01b3829 to your computer and use it in GitHub Desktop.
VideoGameMusicApp: CancionesViewModel.cs
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
using System.Collections.ObjectModel; | |
using System.Threading.Tasks; | |
using VideoGameMusicApp.Models; | |
using VideoGameMusicApp.Services; | |
namespace VideoGameMusicApp.ViewModels | |
{ | |
public class CancionesViewModel : BaseViewModel | |
{ | |
private ObservableCollection<Cancion> canciones; | |
public ObservableCollection<Cancion> Canciones | |
{ | |
get { return canciones; } | |
set | |
{ | |
canciones = value; | |
OnPropertyChanged(); | |
} | |
} | |
public CancionesViewModel() | |
{ | |
} | |
public async Task ObtenerCanciones() | |
{ | |
IsLoading = true; | |
Canciones = new ObservableCollection<Cancion>(await ServicioCanciones.ObtenerCanciones()); | |
IsLoading = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment