Exemplo n.º 1
0
        private void HideCreateNewAdventureSection(object sender, BackRequestedEventArgs e)
        {
            e.Handled = true;
            (App.Current as App).BackRequested -= HideCreateNewAdventureSection;
            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
                Frame.CanGoBack ?
                AppViewBackButtonVisibility.Visible :
                AppViewBackButtonVisibility.Collapsed;

            MainControlsTitle.Text = _title;

            MainScrollViewer.Fade(1).Scale(1f, 1f, (float)MainScrollViewer.ActualWidth / 2, (float)MainScrollViewer.ActualHeight / 2).SetDuration(300).Start();
            MainScrollViewer.IsHitTestVisible = true;

            CreateAdventureSection.Scale(1.2f, 1.2f, (float)CreateAdventureSection.ActualWidth / 2, (float)CreateAdventureSection.ActualHeight / 2)
            .Fade(0).SetDuration(200).Start();
            CreateAdventureSection.IsHitTestVisible = false;
        }
Exemplo n.º 2
0
        private void MainControlsNewAdventureButton_Click(object sender, RoutedEventArgs e)
        {
            MainScrollViewer.Fade(0).Scale(0.5f, 0.5f, (float)MainScrollViewer.ActualWidth / 2, (float)MainScrollViewer.ActualHeight / 2).SetDuration(200).Start();
            MainScrollViewer.IsHitTestVisible = false;

            _title = MainControlsTitle.Text;
            MainControlsTitle.Text = "NEW ADVENTURE";

            FindName("CreateAdventureSection");
            CreateAdventureSection.Scale(1.2f, 1.2f, (float)ActualWidth / 2, (float)CreateAdventureSection.ActualHeight / 2, 0)
            .Then().Fade(1).Scale(1f, 1f, (float)ActualWidth / 2, (float)CreateAdventureSection.ActualHeight / 2, 0)
            .SetDuration(300).Start();
            CreateAdventureSection.IsHitTestVisible = true;

            (App.Current as App).BackRequested += HideCreateNewAdventureSection;
            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            CreateAdventureTextBox.Focus(FocusState.Keyboard);
        }