コード例 #1
0
 /// <summary>
 /// Navigates to the song selected view
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SearchResults_CurrentChanged(object sender, EventArgs e)
 {
     Log("Selected song...");
     try
     {
         if (SearchResults.CurrentItem != null)
         {
             var song = SearchResults.CurrentItem as AllJoinedTable;
             Log($"Navigating to song from InstantSearch : {song.Id} - {song.Artist} - {song.Title}", Category.Debug);
             _regionManager.RequestNavigate(Regions.ContentRegion,
                                            ViewNames.SongSelectedView, NavigationHelper.CreateSongNavigation(song));
         }
     }
     catch (Exception ex)
     {
         Log(ex.Message, Category.Exception);
     }
 }
コード例 #2
0
        /// <summary>
        /// Displays the <see cref="ViewNames.SongSelectedView"/>
        /// </summary>
        /// <param name="playlistItemViewModel"></param>
        private void OnShowSongInfo(PlaylistItemViewModel playlistItemViewModel)
        {
            var song = playlistItemViewModel.Song;

            try
            {
                Log($"Navigating to song from Playlists : {song.Id} - {song.Artist} - {song.Title}", Category.Debug);
                _regionManager.RequestNavigate(Regions.ContentRegion, ViewNames.SongSelectedView, NavigationHelper.CreateSongNavigation(song));
            }
            catch (Exception ex)
            {
                Log(ex.Message, Category.Exception);
            }
        }