void PlaybackList_CurrentItemChanged(MediaPlaybackList sender, CurrentMediaPlaybackItemChangedEventArgs args)
{
//Uri s = GetCurrentTrackId();
// Get the new item
var item = args.NewItem;
Debug.WriteLine("PlaybackList_CurrentItemChanged: " + (item == null ? "null" : Convert.ToString(GetTrackId(item))));
// Update the system view
UpdateUVCOnNewTrack(item);
// Get the current track
Uri currentTrackId = null;
if (item != null)
{
string trackIdKey = item.Source.CustomProperties[TrackIdKey].ToString();
currentTrackId = new Uri(trackIdKey);
}
ApplicationSettingsHelper.SaveSettingsValue(ApplicationSettingsConstants.TrackId, currentTrackId == null ? null : currentTrackId.ToString());
MessageService.SendMessageToForeground(new TrackChangedMessage(currentTrackId));
}