private void OnMenuItemClicked(object sender, RoutedEventArgs args) { var menuItem = (MenuItem)sender; MediaItemsListModelItem mediaItem = (MediaItemsListModelItem)menuItem.CommandParameter; var tag = menuItem.Tag.ToString(); switch (tag) { case DeleteTag: DeleteLibraryItemCommand.GetCommand().Execute(mediaItem); break; case AddToQueueTag: AddItemToQueueCommand.GetCommand().Execute(mediaItem); break; case DownloadNowTag: DownloadNowCommand.GetCommand().Execute(mediaItem); break; case ShowLinksTag: ShowLinksCommand.GetCommand().Execute(mediaItem); break; case ShowDescriptionTag: ShowDescriptionCommand.GetCommand().Execute(mediaItem); break; default: break; } }
private void OnLinksButtonClicked(object sender, EventArgs args) { ShowLinksCommand.GetCommand().Execute(MediaItemModel); }