Esempio n. 1
0
        private void NavButton_Click(object sender, RoutedEventArgs e)
        {
            Button but = new Button();

            but = sender as Button;

            switch (but.Name.ToString())
            {
            default:
                break;

            case "Forward":
                if (EmbeddedFrame.CanGoForward)
                {
                    EmbeddedFrame.GoForward();
                }

                break;

            case "Back":
                if (EmbeddedFrame.CanGoBack)
                {
                    EmbeddedFrame.GoBack();
                }
                break;

            case "Home":
                EmbeddedFrame.Navigate(typeof(Home), null);
                break;

            case "AppBar":
                if (!this.TopAppBar.IsOpen)
                {
                    this.TopAppBar.IsOpen = true;
                }
                else
                {
                    this.TopAppBar.IsOpen = false;
                }
                break;
            }
        }
Esempio n. 2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     EmbeddedFrame.Navigate(typeof(Home), null);
 }