I have a situation where I need to determine if I've reached the end of a Storyboard, and then need to seek to the end of it.
I want to do:
storyboard.Seek(timespan);
However, if timespan is longer than the storyboard's duration, I get an exception. If I look at
storyboard.Duration.TimeSpan
I get an error because the Duration is Automatic. This means I can't do "if( timespan > storyboard.Duration.TimeSpan) ..."
Once I know that the position I'm seeking is past the end of the storyboard, I need to just seek to the end of the storyboard. I could do this with storyboard.Seek(storyboard.Duration.TimeSpan), but again, I can't use Duration because it is Automatic.
It seems like all my problems could be solved if I can force the Duration away from Automatic. Hopefully I'm just missing something simple.