Example #1
0
        private void AnimateAddButton(bool open, Grid targetspacer, Grid addButtonGrid)
        {
            SettingsButton.BeginAnimation(OpacityProperty, open ? _opacityUp : _opacityDown);
            return;

            if (open && ((ScaleTransform)targetspacer.LayoutTransform).ScaleX == 1)
            {
                return;
            }
            if (!open && ((ScaleTransform)targetspacer.LayoutTransform).ScaleX == 0)
            {
                return;
            }
            var to = open ? 1 : 0;

            //var from = open ? 0 : 1;
            targetspacer.LayoutTransform.BeginAnimation(ScaleTransform.ScaleXProperty,
                                                        new DoubleAnimation(to, TimeSpan.FromMilliseconds(250))
            {
                EasingFunction = new QuadraticEase()
            });
            addButtonGrid.BeginAnimation(OpacityProperty,
                                         new DoubleAnimation(to, TimeSpan.FromMilliseconds(250))
            {
                EasingFunction = new QuadraticEase()
            });
        }
Example #2
0
 private void OnWindowMouseLeave(object sender, MouseEventArgs e)
 {
     SettingsButton.BeginAnimation(OpacityProperty, _opacityDown);
     Task.Delay(1000).ContinueWith(t => Dispatcher.InvokeAsync(() =>
     {
         if (IsMouseOver)
         {
             return;
         }
         AbnormalityIndicatorBase.InvokeVisibilityChanged(this, false);
     }));
 }
Example #3
0
 private void OnWindowMouseEnter(object sender, MouseEventArgs e)
 {
     AbnormalityIndicatorBase.InvokeVisibilityChanged(this, true);
     SettingsButton.BeginAnimation(OpacityProperty, _opacityUp);
 }
Example #4
0
 private void AnimateSettingsButton(bool open)
 {
     SettingsButton.BeginAnimation(OpacityProperty, open ? _opacityUp : _opacityDown);
 }