public HomePageViewModel(IArtistsApiClient artistsApiClient, INavigationService navigationService, IMessenger messenger) { _artistsApiClient = artistsApiClient; _navigationService = navigationService; _messenger = messenger; LoadingBarVisibility = Visibility.Hidden; }
public InfoPageViewModel(IArtistsApiClient artistsApiClient, INavigationService navigationService, IMessenger messenger) { _artistsApiClient = artistsApiClient; _navigationService = navigationService; _messenger = messenger; _messenger?.Register <ArtistDetailsMessage>(this, message => { ArtistName = message.Artist.name; Bio = message.Artist.bio.summary; FirstPublished = message.Artist.bio.published; Listeners = message.Artist.stats.listeners; ImgageSource = message.Artist.image[4].text; ObservableCollection <Artist> simularArtistsTemp = new ObservableCollection <Artist>(); for (int i = 0; i < 4; i++) { simularArtistsTemp.Add(message.Artist.similar.artist[i]); } SimilarArtist = simularArtistsTemp; }); }