Example #1
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        async protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            //set which items are visible

            BottomBar.Visibility           = Visibility.Collapsed;
            RecentReadsListView.Visibility = Visibility.Collapsed;
            LibraryListView.Visibility     = Visibility.Visible;
            //set which buttons are currently chosen
            RecentReadsBorder.BorderThickness = new Thickness(0);
            LibraryBorder.BorderThickness     = new Thickness(3);
            _isRecentReads = false;
            //open data
            await RetrieveLibrary();

            LibrarySource.SortByBookNameAscending();
            LibraryListView.Focus(FocusState.Programmatic);
            //make no item currently selected
            LibraryListView.SelectedItem = null;
            //set a MainPage for other pages to access this
            Current = this;
        }