Exemple #1
0
        private void OnActivity(object s, MouseEventArgs e)
        {
            _inactivityTimer.Stop();
            var animation = new DoubleAnimation(1, new Duration(TimeSpan.FromSeconds(0.3)));

            animation.EasingFunction = new SineEase {
                EasingMode = EasingMode.EaseInOut
            };

            MainDockPanel.BeginAnimation(OpacityProperty, animation);
            this.Cursor = _defaultCursor;
            _inactivityTimer.Start();
        }
Exemple #2
0
        private void OnInactivity(object s, EventArgs e)
        {
            if (MainDockPanel.IsMouseOver)
            {
                return;
            }

            var animation = new DoubleAnimation(0, new Duration(TimeSpan.FromSeconds(0.3)));

            animation.EasingFunction = new SineEase {
                EasingMode = EasingMode.EaseInOut
            };

            MainDockPanel.BeginAnimation(OpacityProperty, animation);
            this.Cursor = Cursors.None;
        }