3

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???

Dor Cohen
  • 16,769
  • 23
  • 93
  • 161
  • 1
    Have a look [Here](http://stackoverflow.com/questions/6593685/xbap-in-fullscreen-mode). – Willem Sep 01 '11 at 09:14
  • Thank you Willem, I saw this but I don't want to open new process. i want regular full screen mode, like in Silverlight: Application.Current.Host.Content.IsFullScreen = true; – Dor Cohen Sep 01 '11 at 11:31
  • I also want the state of all framework elements will stay the same and that i will have control of them and can switch back to normal mode – Dor Cohen Sep 01 '11 at 11:45
  • Good question! I would like to know as well. – Willem Sep 01 '11 at 13:29
  • As far as i know, there isn't a setting equivalent to `WindowState.Maximized`. – Willem Sep 01 '11 at 13:31
  • Have you tried IE in Kiosk mode? http://stackoverflow.com/questions/6593685/xbap-in-fullscreen-mode – Tri Q Tran Nov 29 '11 at 00:41

1 Answers1

1

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!!

Dor Cohen
  • 16,769
  • 23
  • 93
  • 161