<html dir="ltr" xmlns:mshelp="http://msdn.microsoft.com/mshelp"
xmlns:silverlightsdk="http://msdn.microsoft.com/silverlight" xmlns=
"http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="online documentation, web online help, web help, chm2web" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="chm2web Standard 2.7 (unicode)" />
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8" />
<title>OnFullScreenChange Event</title>
<link rel="stylesheet" href="../../default.css" type="text/css" />
<script type="text/JavaScript" src="../../files/supply.js"></script>
<script type="text/JavaScript">
chmtop.c2wtopf.pageid = "reference/e_silverlightcontrol_onfullscreenchange.htm";
</script>
</head>
<body topmargin="0"><script type="text/JavaScript">
if (window.name != "content")
document.write(" <table width=\"100%\" bgcolor=\"#e1e1e1\"cellspacing=\"2\" cellpadding=\"0\" style=\"border-collapse: collapse; font-family: sans-serif; font-size: 14px; color: #000000; text-decoration: none; \"> <tr> <td align=\"center\" style=\"border-bottom: 2px solid gray\" > <br> Click <a href=\"../../index.html?page=source%2freference%2fe_silverlightcontrol_onfullscreenchange.htm\">here</a> to show toolbars of the Web Online Help System: <a href=\"../../index.html?page=source%2freference%2fe_silverlightcontrol_onfullscreenchange.htm\">show toolbars</a><br> </td></tr></table><br> ");
</script>
<!-- !chm2web! -->
<span id="sdkbannersection"></span>
<div class="tableSection"><span id="sdkbannersection"></span>
<table class="buttonbarshade" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
</div>
<div class="tableSection"><span id="sdkbannersection"></span>
<table class="buttonbartable" cellspacing="0">
<tr id="hdr">
<td class="runninghead" nowrap="nowrap"><img src=
"../common/logo.png" height="21" alt="Silverlight SDK" />
</td>
</tr>
</table>
</div>
<p><span class="betaboilerplate"><font color="gray" pointsize="8.5"
face="Verdana">[This topic is pre-release documentation and is
subject to change in future releases. Blank topics are included as
placeholders.]</font></span>
</p>
<h1><a name=
"silverlight_silverlightcontrol_onfullscreenchange_event"></a>OnFullScreenChange
Event</h1>
<div id="mainSection">
<div id="mainBody">
<p>Occurs whenever the <a href=
"p_silverlightcontrol_fullscreen.htm">FullScreen</a> property of
the Silverlight plugin changes.</p>
<div id="syntaxblock">
<table class="auto_syntaxtable" id="syntaxtable" style=
"width: 90%; background: #CCCCCC; border: none;">
<tr id="scriptingSyntaxBlock">
<td>
</td>
</tr>
<tr id="scriptingSyntaxBlock">
<th class="syntaxblocklanguage" nowrap="nowrap" style=
"width: 150px; background: #EEEEEE; vertical-align: top;">Scripting
(Instantiation)</th>
<td class="syntaxblockcode" style="background:white;">
<div class="codesyntax" style=
"font-family: 'Courier New', Courier, monospace;">Cannot add
handlers during instantiation</div>
</td>
</tr>
<tr>
<th class="syntaxblocklanguage" nowrap="nowrap" style=
"width: 150px; background: #EEEEEE; vertical-align: top;">Scripting
(Runtime)</th>
<td class="syntaxblockcode" style="background:white;">
<div class="codesyntax">
<i>silverlightObject</i>.<b>onFullScreenChange</b> =
<i>functionName</i></div>
</td>
</tr>
</table>
</div>
<div id="parametersection">
<h4>Event Handler Parameters</h4>
<div class="tableSection">
<table class="parametertable" id="table1">
<tr>
<td class="parametername"><i>sender</i>
</td>
<td class="parameterdesc"><b>Object</b>
<p>Identifies the object that invoked the event (the Silverlight
plugin).</p>
</td>
</tr>
<tr>
<td class="parametername"><i>eventArgs</i>
</td>
<td class="parameterdesc"><b>Object</b>
<p>This parameter is always set to null.</p>
</td>
</tr>
</table>
</div>
</div>
<h4>Event Information</h4>
<p>The <b>OnFullScreenChange</b> event occurs whenever the
Silverlight plugin changes between <i>embedded mode</i> and
<i>full-screen mode</i>:</p>
<ul>
<li><b>embedded mode</b> <font face="Verdana">--plugin displays
within the Web browser.</font></li>
<li><font face="Verdana"><b>full-screen mode</b>--plugin displays
on top of all other applications.</font>
</li>
</ul>
<h4>Remarks</h4>
<p>When the Silverlight plugin displays in embedded mode, the
plugin is contained within the browser window. When Silverlight
plugin displays in full-screen mode, the plugin resizes to the
current resolution of the display and overlays all other
applications, including the browser. The following images show the
differences between embedded mode and full-screen mode:</p>
<p><img border="0" src="../conceptual/images/fullscreenmode_01.png"
width="821" height="331" alt=
"Embedded mode and full-screen mode" /><br />
<b>Silverlight plugin displaying as embedded and full-screen
mode</b>
</p>
<br />
<p>The following JavaScript example shows how to define a
<b>OnFullScreenChange</b> event for a Silverlight plugin.</p>
<div class="snippetdistributor_codesnippet" id=
"fullscreen_snip#FullScreen01">
<div style="width: 99%;">
<table class="codeexampletable" style=
"border: 1px solid #999999; background: #CCCCCC; width: 99%;">
<tr>
<th class="codelanguagecell" style=
"background: #CCCCCC; text-align: left;">JavaScript</th>
</tr>
<tr>
<td class="codeblockcell" style=
"background: #e6e6e6; border: none;">
<pre class="codeblock" style=
"background: transparent; border: none; margin: 0px; padding: 0px; font-family:'Courier New', Courier, monospace;">
var plugin;
function onLoaded(sender, args)
{
// Retrieve a reference to the plugin.
plugin = sender.getHost();
// Set the event handler function for the OnFullScreenChange event.
plugin.content.onFullScreenChange = onFullScreenChanged;
// Do initial layout of the app based on initial size.
updateLayout(plugin.content.actualWidth, plugin.content.actualHeight);
}
function onFullScreenChanged(sender, eventArgs)
{
// Do layout resizing of the app whenever the FullScreen property changes.
updateLayout(plugin.content.actualWidth, plugin.content.actualHeight);
}
// Resize and reposition application elements.
function updateLayout(width, height)
{
// Perform layout tasks based on width and height.
}
</pre>
</td>
</tr>
</table>
</div>
</div>
<p class="note"><b>Note</b> Silverlight does not support
automatic layout of elements. This means that applications have to
provide logic to resize themselves appropriately when the plugin's
size changes.</p>
<h4>Applies To</h4>
<p><a href="o_silverlightcontrol.htm">Silverlight Plugin</a>
</p>
<h4>See Also</h4>
<p><a href=
"p_silverlightcontrol_actualheight.htm">ActualHeight</a>, <a href=
"p_silverlightcontrol_actualwidth.htm">ActualWidth</a>, <a href=
"e_silverlightcontrol_onresize.htm">OnResize</a>, <a href=
"../conceptual/silverlight_fullscreen.htm">Silverlight Full Screen
Support</a>, <a href=
"../conceptual/silverlight_resizing.htm">Resizing a Silverlight
Plugin</a></p>
</div>
</div>
<script type="text/JavaScript">
var fe = FindFrame("toc", top);
if ((fe != null) && (chmtop.c2wtopf.jstree != null)) {
if (chmtop.c2wtopf.FITEMS[chmtop.c2wtopf.pagenum] != chmtop.c2wtopf.pageid)
chmtop.c2wtopf.jstree.OpenTreeNode("source/" + chmtop.c2wtopf.pageid);
}
</script>
<!-- CHM2WEB -->
<!-- DO NOT DELETE OR MODIFY THIS CODE WITHOUT
WRITTEN PERMISSION OF A!K RESEARCH LABS -->
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;">
<tr> <td align="right" style="background-color:white; border-top: 1px solid gray;">
<a href="http://chm2web.aklabs.com" target="_blank" style="font-family: sans-serif; font-size: 11px; text-decoration: none;"><font color="gray">Converted from CHM to HTML with <b>chm2web Standard 2.7 (unicode)</b></font></a>
</td></tr></table>
<!-- /CHM2WEB -->
</body>
</html>