private async void OnCurrentTrack(Song value) { ellStoryboard.Stop(); ellStoryboard.Begin(); if (!IsOpen || !ViewModelLocator.Instance.Main.PlayerSession.IsPlaying) { ellStoryboard.Pause(); } string ImgPath = value?.PictureUrl; var action = BlurCanvas.RunOnGameLoopThreadAsync(async() => { await ReflashBackground(BlurCanvas, ImgPath); BlurCanvas.Invalidate(); }); // if (!string.IsNullOrEmpty(value?.Lyric)) // { //TODO analyse Lyric url is a local url or a web file,to get // var file = await StorageFile.GetFileFromPathAsync(value.Lyric)); var file = await KnownFolders.MusicLibrary.GetFileAsync("12.lrc"); // StorageFile.GetFileFromApplicationUriAsync(new Uri( value.Lyric)); var filetext = await FileIO.ReadTextAsync(file); _lyricModel = LrcFile.FromText(filetext); lb_Lyrics.ItemsSource = _lyricModel.Lyrics; // } }
private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e) { string ImgPath = CurrentTrack?.PictureUrl; var action = BlurCanvas.RunOnGameLoopThreadAsync(async() => { await ReflashBackground(BlurCanvas, ImgPath); BlurCanvas.Invalidate(); }); }