This doesn't work currently, you can create the appropriate XAML for your storyboard and children and then do a CreateFromXaml, see this thread for more information:
Another thing I've done is put placeholders in my XAML for the control or the page and then populate the values at run time, for example I would create a storyboard and a doubleanimation child in my XAML, and then set the to and from, and even the target
element at run time.
Bill Reiss
Contributor
4973 Points
947 Posts
Re: Can't Create Storyboard from Scratch in Code
Jun 25, 2007 03:53 AM | LINK
This doesn't work currently, you can create the appropriate XAML for your storyboard and children and then do a CreateFromXaml, see this thread for more information:
http://silverlight.net/forums/t/842.aspx
Another thing I've done is put placeholders in my XAML for the control or the page and then populate the values at run time, for example I would create a storyboard and a doubleanimation child in my XAML, and then set the to and from, and even the target element at run time.
Bill Reiss, Coauthor of Hello! Silverlight
My blog