async void OpenSingerPage(int id) { Service1Client client = new Service1Client(); Song_Singer singer; singer = await client.GetSingerFullAsync(id); SingerPage_Control singerPage_Control = new SingerPage_Control(singer); singerPage_Control.ScrollCall += Grid_ScrollCall; tape_panel.Child = singerPage_Control; state.Current_Tab = singerPage_Control; singerPage_Control.AlbumPlay += Playlist_OnSongPlaying; singerPage_Control.AlbumPause += Playlist_OnSongPaused; }
private void ListBoxItem_Selected(object sender, RoutedEventArgs e) { Console.WriteLine("click"); SingerPage_Control tmp = FindParent <SingerPage_Control>(this); foreach (AlbumGrid child in tmp.albums_panel.Children) { if (child != this) { child.songs_lb.SelectedIndex = -1; } } ((ListBoxItem)sender).Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFB8FF8F")); Border playBord = GetPlayBorder((ListBoxItem)sender); if (playBord != null) { ((PackIcon)playBord.Child).Kind = PackIconKind.PauseCircleOutline; } }