Monday, March 29, 2010

Silverlight 4 RC - Pinned full-screen mode

Are you a developer with multiple monitor setup? I’m jealous. If you’ve used silverlight you’ve no doubt run into a situation where you’ve put something in full-screen on one monitor and anticipated being able to work on other stuff in the other monitor. Maybe you’re watching a Netflix movie while working? You’ve likely experienced the issue that the full-screen mode goes back to regular when activity occurs in the second monitor.

We’ve changed that to enable the developer to prompt for permission to 'pin’ the Silverlight application to the monitor. This will prompt the consent dialog option (with preference remembering) to get the user’s permission. The code is extremely simple:

   1: App.Current.Host.Content.FullScreenOptions = System.Windows.Interop.FullScreenOptions.StaysFullScreenWhenUnfocused;

Once that is implemented, the full-screen application will remain pinned until the user hits ESC key or until you change the IsFullScreen mode in the code for them.

You can view a video on using the full-screen pinning mode here.


Source : http://timheuer.com/blog/archive/2010/03/15/whats-new-in-silverlight-4-rc-mix10.aspx

No comments:

Post a Comment