public override void OnActivated() { base.OnActivated(); // CollectionModuleBase handles activation of common parts ShelvesList.Activate(); BookDetails.Activate(); UpdateSelectedShelves(); // Show message if there are no books in the collection if (!state_manager.CurrentCollection.Books.Any()) { MessageBus.Current.SendMessage(new InformationMessage("No books in collection, import here", "Go", () => MessageBus.Current.SendMessage(NavigationMessage.Import))); } book_view_models = state_manager.CurrentCollection .Books .Select(b => new BookViewModel(b)) .ToList(); Books = CollectionViewSource.GetDefaultView(book_view_models); Books.Filter = Filter; current_book_disposable = Books.Events() .WhenAnyObservable(x => x.CurrentChanged) .Select(_ => Books.CurrentItem as BookViewModel) .Subscribe(vm => BookDetails.CurrentBook = vm?.Obj); // This is needed to update the book details Books.Refresh(); }