예제 #1
0
        public async void Navigate(string navItemTag, NavigationTransitionInfo transitionInfo, object parameter = null)
        {
            Type _page = null;

            if (navItemTag == "settings")
            {
                SettingsDialog dialog = new SettingsDialog();
                await dialog.ShowAsync();
            }
            else if (navItemTag == "About")
            {
                AboutDialog dialog = new AboutDialog();
                await dialog.ShowAsync();
            }
            else
            {
                _page = UISystem.PageNameToType(navItemTag);
            }
            // Get the page type before navigation so you can prevent duplicate
            // entries in the backstack.
            var preNavPageType = ContentFrame.CurrentSourcePageType;

            // Only navigate if the selected page isn't currently loaded.
            if (!(_page is null) && !Equals(preNavPageType, _page))
            {
                nv_PagePresenter.SelectedItem = navItemTag;
                ContentFrame.Navigate(_page, parameter, transitionInfo);
            }
        }
예제 #2
0
 private async void AboutButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         await _aboutDialog.ShowAsync();
     }
     catch (Exception)
     {
     }
 }
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            AboutDialog         aboutDialog = new AboutDialog();
            ContentDialogResult result      = await aboutDialog.ShowAsync();

            if (result == ContentDialogResult.Primary)
            {
                // Close pressed
            }
            else if (result == ContentDialogResult.Secondary)
            {
                // Cancel Pressed
            }
        }
예제 #4
0
        private async void CommandList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (CommandList.SelectedIndex == -1)
            {
                return;
            }
            switch (((ListBoxItem)CommandList.SelectedItem).Name)
            {
            case "Locations":
                Frame thisFrame = Window.Current.Content as Frame;
                thisFrame.Navigate(typeof(LocationsPage));
                break;

            case "About":
                AboutDialog dlg = new AboutDialog();
                await dlg.ShowAsync();

                break;
            }
            Split.IsPaneOpen          = false;
            CommandList.SelectedIndex = -1;
        }
예제 #5
0
 private async void ShowAboutDialog()
 {
     var dialog = new AboutDialog();
     await dialog.ShowAsync();
 }
        private void AboutButton_Click(object sender, RoutedEventArgs e)
        {
            var aboutDialog = new AboutDialog();

            aboutDialog.ShowAsync();
        }
예제 #7
0
 public async void Execute(object parameter)
 {
     AboutDialog about = new AboutDialog();
     await about.ShowAsync();
 }
예제 #8
0
 private async void AboutButton_Click(object sender, RoutedEventArgs e)
 {
     ContentDialog dialog = new AboutDialog();
     await dialog.ShowAsync();
 }
예제 #9
0
        // CommandBar Events //
        private async void AboutCommandBarButtonClick(object sender, RoutedEventArgs e)
        {
            var aboutDialog = new AboutDialog();

            await aboutDialog.ShowAsync();
        }