views:

549

answers:

2

Hi,

Is there any way to load my silverlight app in F11 mode directly? I have used

window.open(url, '_self', 'toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=no,fullscreen=yes','true');

HtmlPage.window.invoke("launchPage",url); but the problem is that two instances of my app are opened. One in normal screen and the other in fullscreen.

I have tried App.Current.Host.Content.IsFullScreen = true; in the constructor of the App.xaml Still its not working. :( Where am I going wrong??

+1  A: 

Hi,

running a Silverlight application automatically in full-screen is not possible because of security restriction. It is like the following...

  1. You have opened your banks login page in a Firefox tab. This is your current tab.
  2. You are opening a malicious silverlight application on another tab.
  3. The malicious silverlight application loads and creates a full-screen that exactly matches your bank's login page.
  4. You are talking to someone while the silverlight application loads. (Your eye is not on screen) So you missed the fullscreen message that pops up.
  5. Now when you look at the computer screen you see your bank login page that is actually a fullscreen page of the silverlight application that matches your bank's login page.
  6. You enter your user name and password...and
  7. When you click login the malicious application has got everything it wanted.

This is not only for Silverlight. It is a restriction that SHOULD BE THERE WITH EVERY ACTIVEX CONTROL UNTIL THIS PROBLEM IS SOLVED.

What you are doing with javascript is you are opening a new pop up window without menubar, addressbar etc. It is not a replacement of F11. And to my experience most of the users hate automatic poping up. And most modern browsers will block them anyway.

The best way is to tell the user she needs to view your application on fullscreen and LET HER DECIDE INSTEAD OF FORCING IT.

Tanmoy
A: 

Hi,

running a Silverlight application automatically in full-screen is not possible because of security restriction. It is like the following...

  1. You have opened your banks login page in a Firefox tab. This is your current tab.
  2. You are opening a malicious silverlight application on another tab.
  3. The malicious silverlight application loads and creates a full-screen that exactly matches your bank's login page.
  4. You are talking to someone while the silverlight application loads. (Your eye is not on screen) So you missed the fullscreen message that pops up.
  5. Now when you look at the computer screen you see your bank login page that is actually a fullscreen page of the silverlight application that matches your bank's login page.
  6. You enter your user name and password...and
  7. When you click login the malicious application has got everything it wanted.

This is not only for Silverlight. It is a restriction that SHOULD BE THERE WITH EVERY ACTIVEX CONTROL UNTIL THIS PROBLEM IS SOLVED.

What you are doing with javascript is you are opening a new pop up window without menubar, addressbar etc. It is not a replacement of F11. And to my experience most of the users hate automatic poping up. And most modern browsers will block them anyway.

The best way is to tell the user she needs to view your application on fullscreen and LET HER DECIDE INSTEAD OF FORCING IT.

Tanmoy