private void MediaObjectItem_Click(object sender, RoutedEventArgs e) { var mediaObjectItem = (Component.MediaObjectItem)sender; if (mediaObjectItem.MediaObject is PlexArtist) { var browseArtist = new BrowseArtist(mediaObjectItem.MediaObject as PlexArtist, mediaObjectItem.Menu); var mainWindow = MainWindow.GetInstance(); mainWindow.Frame.Navigate(browseArtist); } else if (mediaObjectItem.MediaObject is PlexAlbum) { var browseAlbum = new BrowseAlbum(mediaObjectItem.MediaObject as PlexAlbum, mediaObjectItem.Menu); var mainWindow = MainWindow.GetInstance(); mainWindow.Frame.Navigate(browseAlbum); } else { mediaObjectItem.OpenContextMenu(); } }
private void MediaObjectItem_Click(object sender, RoutedEventArgs e) { var mediaObjectItem = (Component.MediaObjectItem)sender; var browseAlbum = new BrowseAlbum(mediaObjectItem.MediaObject as PlexAlbum, mediaObjectItem.Menu); var mainWindow = MainWindow.GetInstance(); mainWindow.Frame.Navigate(browseAlbum); }