To view the silverlight app in fullscreen mode(F11) - silverlight

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

running a Silverlight application automatically in full-screen is not possible because of security restriction. It is like the following...
You have opened your banks login page in a Firefox tab. This is your current tab.
You are opening a malicious silverlight application on another tab.
The malicious silverlight application loads and creates a full-screen that exactly matches your bank's login page.
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.
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.
You enter your user name and password...and
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.

Related

Disable popup blocker in firefox

From one of our application, we are calling window.open() method to open a pop up. When we are using this, the browsers are blocking the popup and user has to disable popup blocker for the specified web site.
Is there any way to disable the popup blockers for specified URL patterns(With out user intervention),like using browser API etc...
No. There is no way to alter the browser's popup blocker behaviour from within a webpage. The best you can do is include a message on your website asking people to turn off their popup blockers while using your site so that the site can function properly.

Silverlight and the back button

Is there a way to override the behavior of the back button in the browser when using a Silverlight app?
Essentially what I want to do is use the browser's back button to close dialogs in my application. The dialog covers the whole screen and the user would be inclined to think they are on a separate web page.
Look to the following links:
Prevent Browser Back Button for Silverlight with Confirm Dialog.
Silverlight - Prevent users from losing changes by using the browser back button
Managing Silverlight 3 navigation
behavior

In Silverlight, How can I disable Back and Forward navigation using browser buttons?

I'm using the Navigational Framework in Silverlight 4. I'm starting to believe that this was a mistake as the browser buttons are really screwing things up for users. For instance, when a child window is opened the user believes they can close the window by pressing the back button. It doesn't close the window obviously, it just navigates the parent page back a step. The end result is a messed up data set. I'm fed up with the little control I have over the navigation of my application; forward and back buttons are anachronistic. Web applications don't work that way anymore. Please someone tell me how I can disable their functionality; that is, cancel navigation when it is started from one of these buttons.
Remove this code from your html page which holds your silverlight XAP:
<iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
This is the history frame.
You will likely have to do this in the actual web/asp.net page, as Silverlight has no real control over the browser.
Some workarounds in this article:
http://lennilobel.wordpress.com/2009/07/26/defeat-the-evil-back-button-in-your-asp-net-applications/

Windows phone 7 silverlight tombstoning

I have read in requirements that when user presses the back button, application must exit.
(5.4.2): "Pressing the Back button from the first screen of an application must exit the application".
So, i have read in many sites that exitting in silverlight is not available, but i think that they mean, that application should only deactivate (for example, it is deactivated when we press button with "windows flag").
I have a main menu in my application. If i navigate on another pages and return to main menu, pressing "back button" doesn't deactivate application because previous pages are another pages in application. So, maybe I need to clean "navigation history" ? But it is not possible, i have readed it somewhere...
so, what to do in this case?
The back button must exit the application from the first screen in your application. Your application is supposed to navigate backwards through your page stack if the user has navigated forwards through your pages.
This requirement simply means that you application must not prevent the user from exiting the application when the press the back button and have reached the first page.
First off, there is no explicite exiting in Silverlight. There is no Exit() method.
Think of your app as a webapp and whole navigation system is like a simple browser with back, home and search button.
Can you close stackoverflow.com ? you can back to another site (if any) or press start/home button to leave stackoverflow (if it's not your home page :) )
In Windows Phone 7 the behaviour you describe as "deactivate" is called Tombstoning.
You can use Non-linear Navigation Service to solve your problem with navigation.

Silverlight fullscreen limitations

When a Silverlight plug-in is in full-screen mode, it disables most keyboard events. They say it is for security reasons:
is intended to minimize the
possibility of unintended information
being entered by a user
What I don't understand is what is the difference of silverlight fullscreen or any web browser fullscreen?
Is a browser in fullscreen not a security risk too? Anybody complains about the browser fullscreen mode?
Thank you
The full reason for this is that a malicious Silverlight application could create a UI that matches your banking login screen, the Windows login screen, Facebook or whatever site they wanted your login details.
Not only are certain keyboard keys disabled, but full screen cannot be invoked unless there is a user activated action. For example, the user would have to click a button to go fullscreen, you as a developer are not able to make the app full-screen without this.
This is a pro-active response to known security risks by Microsoft and although there are downsides, the pros do outweigh the cons.

Resources