Skip to content

Instantly share code, notes, and snippets.

@icebeam7
Last active December 16, 2018 13:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save icebeam7/d3acd09ab907481360321d54c01b3829 to your computer and use it in GitHub Desktop.
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