System.Windows.Controls.AnimatedPanel.RectAnimation.PerformTweening C# (CSharp) Method

PerformTweening() protected method

protected PerformTweening ( double frame ) : void
frame double
return void
            protected override void PerformTweening(double frame)
            {
                double left = _initialRect.Left + (_finalRect.Left - _initialRect.Left) * frame;
                double top = _initialRect.Top + (_finalRect.Top - _initialRect.Top) * frame;
                double width = _initialRect.Width + (_finalRect.Width - _initialRect.Width) * frame;
                double height = _initialRect.Height + (_finalRect.Height - _initialRect.Height) * frame;

                Rect bounds = new Rect(left, top, width, height);
                _element.SetValue(BoundsProperty, bounds);
                _element.Arrange(bounds);
            }
AnimatedPanel.RectAnimation