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.

Replies
Know the answer? Post it — somebody with the same question will find it here.