I have written an animation in WPF storyboard: The following is the code:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
public void AnimateRectangle()
{
Storyboard rectrotate = (Storyboard)FindResource("Storyboard1");
rectrotate.Begin();
}
I call this function on button click event.
When I click the button nothing happens.
Please help.
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Madhukar KrishnaPosted May 11, 2014, 11:24 PM
IFound out that FillBehavior="Stop" should be used to bring the timeline back to zero
I can also use Autoreverse to true but that also reverses the animation
thanks for all the help
Madhukar KrishnaPosted May 5, 2014, 12:43 PM