【发布时间】:2012-11-12 20:54:49
【问题描述】:
我正在使用 WPF MediaElement 播放视频。当 MediaElement 暂停时,我将位置设置为视频中的另一个点。我希望 MediaElement 中的视频图像刷新以反映新位置。但在我再次按下播放按钮之前,它不会更新图像。有没有办法在不调用 Play 方法的情况下强制刷新 MediaElement 图像?
代码示例
TimeSpan tsPosition = new TimeSpan(0,0,30); // set to 30 seconds
MediaElementObj.Position = tsPosition;
if (PlayStatus == PAUSED) // ignore if not paused
{
// image refresh method call here if there is a way to do it
}
【问题讨论】:
-
你有什么 xaml 可以给我们看吗?
标签: wpf c#-4.0 mediaelement