ShareThis
Author: Sam Kurien
•9:14 PM
Often there is a need to run a Silverlight application full screen. This is often achieved by creating a small button or a link which toggles the application to full screen and using an escape sequence toggling back to small area within your website. The code to do this is quite simple and straight forward:


{
if (!Application.Current.Host.Content.IsFullScreen)
{
Application.Current.Host.Content.IsFullScreen = true;
}
else
{
Application.Current.HostContent.IsFullScreen= false;
}


The explanation to this piece is quite simple so here its is - the if statement checks the current state if the app screen is in full screen mode or not. The if condition starts of by asking If Application is Not full screen then do something in this case set it to full screen or else do something else (in this case set back the app mode from full screen to its original state running within the web page.)
This entry was posted on 9:14 PM and is filed under , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 comments: