private void UpdatePlayingSongView(SongInfo songInfo) { songView = new Model4SongView(songInfo); Dispatcher.Invoke(() => { (new FrameworkElement[] {SongImage, SongTitleLabel, SongAlbumLabel, SongArtistLabel}).ToList().ForEach( i => { i.DataContext = songView; }); NothingPlayingGrid.Visibility = Visibility.Hidden; }); }
private void StaticPipeListenerOnMusicPlay(SongInfo songInfo) { // 表示用データを生成する var songView = new Model4SongView(songInfo); NPIcon.Invoke(() => { ((UserControl)LogicalTreeHelper.FindLogicalNode(NPIcon.ContextMenu, "SmallStatusView")) .DataContext = songView; }); }