private void onSongsButtonClick(object sender, RoutedEventArgs e) { ItemsDisplay items = new SongsDisplay(); ActivityFrame.NavigationService.Navigate(items); items.setViewContent(); }
protected override void SelectItem(object sender, SelectionChangedEventArgs e) { MainWindow window = (MainWindow)Application.Current.MainWindow; Albums a = (Albums)ItemsContainer.SelectedItem; SongsDisplay songsFromAlbum = new SongsDisplay(); MainView view = (MainView)window.MainFrame.Content; view.ActivityFrame.Navigate(songsFromAlbum); using (var session = NHibernateHelper.OpenSession()) { songsFromAlbum.setViewContent((IList <Songs>)db.GetSongsFormAlbum(a, session)); } }