How do I set the repeatbehavior of a WPF 4 mediatimeline in VB.net 2010 code behind?
I know the following code sets the repeatbehavior to forever:
MyMediaTimeline.RepeatBehavior = RepeatBehavior.Forever
However, there doesn’t seem to be anything preset for setting the repeat behavior to none. I’m guessing I’ll need to do something like the following, but what should the “?” be?
MyMediaTimeline.RepeatBehavior = New RepeatBehavior(?)
As a side note, I have the following above the class.
Imports System.Windows.Media.Animation
To get the default behaviour (play once), you just have to set the RepeatBehavior to 1 (MSDN)
MyMediaTimeline.RepeatBehavior = New RepeatBehavior(1)