private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            this.Closing -= this.Window_Closing;
            e.Cancel      = true;

            DoubleAnimation animation = ElementRenderer.WindowAnimation(this);

            this.BeginAnimation(Window.OpacityProperty, animation);

            animation.Completed += (s, _) => this.Close();
            this.BeginAnimation(UIElement.OpacityProperty, animation);
        }
        private void Window_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            DoubleAnimation animation = ElementRenderer.WindowAnimation(this, 0, 1);

            this.BeginAnimation(Window.OpacityProperty, animation);
        }