예제 #1
0
        private void CancelEditActionButton_Click(object sender, RoutedEventArgs e)
        {
            var opacityAnimation = new DoubleAnimation(0, new Duration(new TimeSpan(0, 0, 0, 0, 150)));
            var animation        = new DoubleAnimation(450, new Duration(new TimeSpan(0, 0, 0, 0, 300)));

            animation.Completed += (s, args) =>
            {
                ActionsViewGrid.Visibility     = Visibility.Visible;
                ActionsRedactorGrid.Visibility = Visibility.Hidden;
                ActionNameTextBox.SetCurrentValue(TextBox.TextProperty, string.Empty);
                ActionNameTextBox.IsEmphasized = false;

                opacityAnimation.To = 1;
                OpacityGrid.BeginAnimation(OpacityProperty, opacityAnimation);
            };

            OpacityGrid.BeginAnimation(OpacityProperty, opacityAnimation);
            BeginAnimation(HeightProperty, animation);

            ActionsViewListBox.IsEnabled = true;
        }
예제 #2
0
 void ActionAdded(ProjectAction obj)
 {
     ActionNameTextBox.Focus(Windows.UI.Xaml.FocusState.Keyboard);
 }