SHARE
TWEET

Untitled

a guest Dec 16th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top