Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 = false;
- Canciones = new ObservableCollection<Cancion>(await ServicioCanciones.ObtenerCanciones());
- IsLoading = true;
- }
- }
- }
Add Comment
Please, Sign In to add comment