Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
VideoGameMusicApp: CancionesViewModel.cs
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
You can’t perform that action at this time.