private void AnimateTabClosing()
{
spaceWidth = root.ActualWidth;
Width = spaceWidth;
var animation = new DoubleAnimation();
animation.Completed += TabClosingAnimation_Completed;
animation.From = 1;
animation.To = 0;
animation.Duration = new Duration(TimeSpan.FromMilliseconds(TAB_CLOSING_ANIMATION_TIME));
var ease = new CubicEase();
ease.EasingMode = EasingMode.EaseOut;
animation.EasingFunction = ease;
root.BeginAnimation(OpacityProperty, animation);
}