private void Remove(SeriesWithoutFolderLibCreation result) { Storyboard sb = (Storyboard)FindResource("OpacityDown"); Storyboard temp = sb.Clone(); temp.Completed += (s, e) => { panel.Children.Remove(result); }; temp.Begin(result); }
private async void AddShow() { Series show = await MainWindow.SearchShow(); if (show.seriesName != null) { var greatClassNameIdiot = new SeriesWithoutFolderLibCreation(show.id); greatClassNameIdiot.Remove.MouseUp += (s, e) => Remove(greatClassNameIdiot); greatClassNameIdiot.Height = 50; greatClassNameIdiot.Opacity = 0; greatClassNameIdiot.SeriesName.Text = show.seriesName; panel.Children.Add(greatClassNameIdiot); Storyboard sb = (Storyboard)FindResource("OpacityUp"); sb.Begin(greatClassNameIdiot); } }