/// <summary> /// Initializes a new instance of the AppShell, sets the static 'Current' reference, /// adds callbacks for Back requests and changes in the SplitView's DisplayMode, and /// provide the nav menu list with the data to display. /// </summary> public AppShell() { this.InitializeComponent(); this.Loaded += async(sender, args) => { Current = this; this.TogglePaneButton.Focus(FocusState.Programmatic); await ActionItemManager.ReloadAsync(); }; this.RootSplitView.RegisterPropertyChangedCallback( SplitView.DisplayModeProperty, (s, a) => { // Ensure that we update the reported size of the TogglePaneButton when the SplitView's // DisplayMode changes. this.CheckTogglePaneButtonSizeChanged(); }); ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(320, 500)); SystemNavigationManager.GetForCurrentView().BackRequested += SystemNavigationManager_BackRequested; // If on a phone device that has hardware buttons then we hide the app's back button. if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { this.BackButton.Visibility = Visibility.Collapsed; } NavMenuList.ItemsSource = navlist; }
private async void ChangeStorageLocation_Click(object sender, RoutedEventArgs e) { await Settings.SelectLocalFileAsync(); await ActionItemManager.ReloadAsync(); }
private async void Refresh_Click(object sender, RoutedEventArgs e) { await ActionItemManager.ReloadAsync(); this.SelectActionItemAndScroll(); }