I am 开发者_C百科using WPF's MediaElement. If the MediaElement is playing, setting the Position works as expected.
However, if the MediaElement is paused, setting the Position has no effect.
How can I set the position of a paused video?
To update frames for seek operations while paused you need to set the ScrubbingEnabled property of the media element to true
. Ie (xaml):
<MediaElement x:Name="Player"
LoadedBehavior="Manual"
UnloadedBehavior="Manual"
ScrubbingEnabled="True" />
MSDN Reference
精彩评论