public MainPage() { this.InitializeComponent(); this.CurrentGroupType = SearchResultsGroupType.Song; this.tracklistPlayer = new TracklistPlayer.TracklistPlayer(this.mediaElement); this.tracklistPlayer.SongChanged += this.TracklistPlayer_SongChanged; this.songDBSearcher = new SongDBSearcher(); this.albumDBSearcher = new AlbumDBSearcher(); this.artistDBSearcher = new ArtistDBSearcher(); this.TrackList.ItemsSource = this.tracklistPlayer.TrackList; this.TracklistPlayerControl.SetTracklistPlayer(this.tracklistPlayer); }
public void SetTracklistPlayer(TracklistPlayer.TracklistPlayer tracklistPlayer) { this.DataContext = tracklistPlayer; tracklistPlayer.SongChanged += (sender, args) => this.LoadImageForSong(args.NewSong); }