Enter full screen mode in wpf browser .xbap hosted in asp.net
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.
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!!
精彩评论