public BlindsAnimation(FrameworkElement topElement, FrameworkElement bottomElement, TimeSpan duration, BlindsMode mode, bool forward) : base(duration) { _topElement = topElement; _bottomElement = bottomElement; _width = topElement.ActualWidth; if (mode == BlindsMode.Up) { _initialHeight = topElement.ActualHeight; _finalHeight = 0; } else { _initialHeight = 0; _finalHeight = topElement.ActualHeight; } if (forward == false) { double temp = _initialHeight; _initialHeight = _finalHeight; _finalHeight = temp; } }