Oct 07
It’s not difficult to make a full screen application. But the sample below can save you a lot of time to look around a reference from the Internet.
Comparison
Flash implementation: 20 minutes
Silverlight implementation: 30 minutes (Implemented First)
What’s the difference?
- stage.displayState[AS3] vs Application.Current.Host.Content.IsFullScreen [C#]
Source codes
Full Screen Demo [Flash 9, AS3] (11.1 KiB, 1,413 hits)
Full Screen Demo [Silverlight 2, C#] (16.1 KiB, 2,119 hits)
Flash
Silverlight
Full Screen: stage.displayState[AS3] vs Application.Current.Host.Content.IsFullScreen [C#]
Switching to Full Screen Mode is very easy. Here is a simple demonstration.
// AS3
stage.displayState = ( stage.displayState == StageDisplayState.FULL_SCREEN)
? StageDisplayState.NORMAL : StageDisplayState.FULL_SCREEN;
stage.addEventListener(FullScreenEvent.FULL_SCREEN, on_full_screen);
private function on_full_screen(e : FullScreenEvent):void{
// get the full screen dimension
var screenWidth:Number = stage.stageWidth;
var screenHeight:Number = stage.stageHeight;
}
Code in C# is similar to than in AS3. It’s pretty straight forward. I don’t describe too much this time.
// C#
Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;
Application.Current.Host.Content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);
void Content_FullScreenChanged(object sender, EventArgs e)
{
// get the full screen dimension
double screenWidth = Application.Current.Host.Content.ActualWidth;
double screenHeight= Application.Current.Host.Content.ActualHeight;
}

October 7th, 2008 at 4:28 am
The Silverlight version doesn’t work for me in Firefox (works fine in IE). But I guess it must just be me since Silverlight is winning in the votes?
October 7th, 2008 at 6:39 am
Silverlight does not work in Firefox for Full Screen. I confirmed!
October 7th, 2008 at 3:53 pm
Full Screen Silverlight works greatly on my Firefox
October 7th, 2008 at 8:41 pm
of course that silverlight works, just as flash does…
October 7th, 2008 at 11:18 pm
The Silverlight version seems to be A LOT faster and responsive when I click to full screen!
October 8th, 2008 at 2:17 am
Thanks for posting the testing result. I only got Firefox 2 installed and Silverlight is not working on it. I even don’t have any chance to see whether it is working or not. haha.
October 9th, 2008 at 5:57 pm
The Silverlight one doesn’t work for me as well in Firefox 3
October 10th, 2008 at 9:14 am
The Flash one is faster for me. Plus it makes more sense as it correctly uses the correct current monitor in dual monitor environments. The Flash one opens fullscreen on the same monitor as your browser window happens to be on, while the Silverlight example opens on the main screen 1 only. I’m not sure if this is your implementation or a limitation of Silverlight’s player…
March 21st, 2009 at 2:25 am
Is it possible to build a true kiosk application with SL3 that will disable all but a configured special alt-key combination, thereby locking down the computer so even alt-tab will not work?
April 20th, 2009 at 2:29 pm
Silverlight is better and much quicker
May 12th, 2009 at 7:06 am
Flash one works fine..silverlight seems to have some display problems on FF (I’m using a Mac).
May 19th, 2009 at 6:51 am
I have a Mac and it works perfectly!
June 12th, 2009 at 10:29 pm
First, I tested with Silverlight 2 and Flash 10 in IE8; and I don’t see a different.
Then, I tried in Firefox 3, Silverlight 2 works the same way; but Flash had some delay.
Finally, I got the same result with Google Chrome as with Firefox 3, with the Flash delay.
Both opened on the same monitor as the browser.
July 13th, 2010 at 9:27 am
[...] Flash Silverlight Download [...]