예제 #1
0
        private void HelpDialogClose_Click(object sender, RoutedEventArgs e)
        {
            if (HelpDialogClose.IsEnabled == false)
            {
                return;
            }
            HelpDialogClose.IsEnabled = false;
            PowerEase pe = new PowerEase();

            pe.Power = 2.5;
            ThicknessAnimation dm = new ThicknessAnimation();

            dm.EasingFunction = pe;
            dm.From           = HelpDialog.Margin;
            dm.To             = new Thickness((this.Width - HelpDialog.Width) / 2, -500, Barcode.Margin.Right, Barcode.Margin.Bottom);
            dm.Duration       = AnimationDuration;
            ColorAnimation pc = new ColorAnimation();

            pc.EasingFunction = pe;
            Color blackFrom = Colors.Black;

            blackFrom.A           = 153;
            pc.From               = blackFrom;
            blackFrom.A           = 0;
            pc.To                 = blackFrom;
            pc.Duration           = AnimationDuration;
            HelpSplash.Visibility = Visibility.Visible;
            HelpDialog.BeginAnimation(Grid.MarginProperty, dm);
            HelpSplash.Background.BeginAnimation(SolidColorBrush.ColorProperty, pc);
            DelayCall(500, new Action(() => { InfoButton.IsEnabled = true; HelpSplash.Visibility = Visibility.Hidden; }));
        }