媒体元素(WPF)无法正常运行Windows 8 [英] Media Element (WPF) is not working Windows 8

查看:96
本文介绍了媒体元素(WPF)无法正常运行Windows 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我创建了一个包含Windows应用程序项目和WPF项目的解决方案。在Windows 8上运行此命令,我收到一个未知错误。如果启动项目是Windows应用程序,那么视频正在播放,但它不可见。但如果启动项目是WPF,则视频播放效果良好。我知道它听起来如何。但我遇到了这个问题。请帮帮我..谢谢。



仅限代码。

Hi,
I created a solution that contain both Windows application project and WPF project in the singe solution. Running this on Windows 8, i am getting a unknown error. That if start up project is Windows application, then the video is playing but its not visible. But If the start up project is WPF then the video is playing well. I know how its sounds like. But i am getting this problem. Please help me on this.. Thank you.

Code is this only.

Moiveplay.Source = new Uri(urls);
           Moiveplay.LoadedBehavior = Moiveplay.UnloadedBehavior = MediaState.Manual;
           Moiveplay.Play();





但我的问题不在于我认为的代码。因为视频正在播放,但它没有观看它。我希望你理解。



But my problem is not with code i think. Because the video is playing, but its not viewing it. I hope you understand.

推荐答案

你好,



在你的XAML页面上添加:

Hi,

Add this on your XAML page:
<MediaElement Name="Moiveplay" />



希望这有帮助。


Hope this helps.


我找到了解决方案。在项目属性中 - >构建 - >平台目标 - >改为X86。然后我在Windows 8中检查了该项目的exe文件。它的工作正常。视频播放也没问题,视频可见。
I found the solution. In the Project Properties-> Build -> Platform target-> changed that to X86. Then i checked that project exe file in windows 8. Its working fine. The video is playing also the no problem with visible of video.


这篇关于媒体元素(WPF)无法正常运行Windows 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆