public async Task Play(Song a, MediaElement m) { if (Songs.Count != 0) { if (Songs.Contains(a)) { NowIndex = Songs.IndexOf(a); } else { Songs.Add(a); NowIndex = Songs.IndexOf(a); } } else { Songs.Add(a); NowIndex = 0; } await Task.Run(() => { a.PlayOnce(); }); var stream = await a.AudioFile.OpenAsync(Windows.Storage.FileAccessMode.Read); m.SetSource(stream, a.AudioFile.ContentType); OnNotifyPlayBackEvent(a); }