在asp.net托管的wpf浏览器.xbap中进入全屏模式
我进行了很多搜索但没有成功。 我在 Wpf 浏览器中编写了媒体播放器,然后将 .xbap 文件部署到 asp.net aspx 文件中。
现在我需要我的媒体播放器能够切换到全屏模式,有人有什么想法吗? 我尝试了很多方法,首先我不想玩控制器的高度\宽度(这不是全屏模式),其次我尝试了以下代码:
App.Current.MainWindow.WindowState = WindowState.Maximized;
但我收到以下消息:
Cannot perform this operation when hosted in browser.
任何人都可以帮助我吗? ??
I has searched a lot but failed to success.
I wrote media player in Wpf Browser, then I deploy my .xbap file inside asp.net aspx file.
now I need my media player will be able to switch into full screen mode, Someone have any idea?
I tried many ways, first I don't want to play with my height\width of my controller (This is not a full screen mode), second I tried the following code:
App.Current.MainWindow.WindowState = WindowState.Maximized;
But I got the following message:
Cannot perform this operation when hosted in browser.
Anyone can help me???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WPF 浏览器中不存在常规的基本全屏,有一些解决方案可以绕过此问题。
使用窗口而不是页面(这将需要完全信任的应用程序),然后以下行将正常工作:
App.Current.MainWindow.WindowState = WindowState.Maximized;
使用 IE kiosk 模式,但随后您的应用程序将在新进程中打开,
使用 PopUp 窗口,但您只能覆盖浏览器大小的 75%。
使用silverlight!!
Regular basic fullscreen not exist in WPF Browser, there are some solutions to create bypass to this problem.
Use Window instead of Page (This will require full trust application) and then the following line will work fine:
App.Current.MainWindow.WindowState = WindowState.Maximized;
Use IE kiosk mode, but then your application will open in a new proccess,
Use PopUp window but then you can only cover 75% from browser size.
Use silverlight!!