开发者

Enter full screen mode in wpf browser .xbap hosted in asp.net

开发者 https://www.devze.com 2023-04-01 00:48 出处:网络
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.

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 开发者_Python百科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???


Regular basic fullscreen not exist in WPF Browser, there are some solutions to create bypass to this problem.

  1. 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;

  2. Use IE kiosk mode, but then your application will open in a new proccess,

  3. Use PopUp window but then you can only cover 75% from browser size.

  4. Use silverlight!!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号