WPF 中MediaElement.MediaEnded、Pause、Stop等方法不执行问题 20
在WPF中创建MediaElement:<MediaElementHeight="1080"Name="enterVideo"Width="1920"LoadedBeha...
在WPF中创建MediaElement:
<MediaElement Height="1080" Name="enterVideo" Width="1920" LoadedBehavior="Manual" MouseLeftButtonUp="mediaElement_MouseUp" MediaEnded="enterVideo_MediaEnded">
<MediaElement.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard>
<Storyboard>
<MediaTimeline Storyboard.TargetName="enterVideo" Source="Medias/EnterAnimation.wmv" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</MediaElement.Triggers>
</MediaElement>
MediaEnded方法没有执行,Pause()、Stop()这些方法也一样,不报错但被忽略了,什么原因,是哪里设置不对吗? 展开
<MediaElement Height="1080" Name="enterVideo" Width="1920" LoadedBehavior="Manual" MouseLeftButtonUp="mediaElement_MouseUp" MediaEnded="enterVideo_MediaEnded">
<MediaElement.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard>
<Storyboard>
<MediaTimeline Storyboard.TargetName="enterVideo" Source="Medias/EnterAnimation.wmv" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</MediaElement.Triggers>
</MediaElement>
MediaEnded方法没有执行,Pause()、Stop()这些方法也一样,不报错但被忽略了,什么原因,是哪里设置不对吗? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询