Esempio n. 1
0
        private void YoutubeItemDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ListBoxItem item = ItemsControl.ContainerFromElement(sender as ListBox, e.OriginalSource as DependencyObject) as ListBoxItem;

            try
            {
                YoutubeSearchItem selectedItem = item.Content as YoutubeSearchItem;
                if (item != null)
                {
                    PlayList.addItem(selectedItem);
                    PlayList.Save();
                    musicListImageClick?.Invoke(sender, EventArgs.Empty);
                }
            }
            catch (Exception)
            {
            }
        }