次の方法で共有


OnFullScreenChanged

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Establishes the handler for the FullScreenChanged event that occurs whenever the FullScreen property of the Silverlight plug-in changes.

<object ...>
  <param name="onfullscreenchanged" value="scriptHandlerName" />
...
</object>
value = silverlightObject.content.OnFullScreenChanged
silverlightObject.content.OnFullScreenChanged = scriptHandlerName

Arguments

sender

object

The object (the Silverlight plug-in) that raised the event.

eventArgs

object

This parameter is always set to null.

Managed Equivalent

Content.FullScreenChanged

Remarks

The FullScreenChanged event occurs whenever the Silverlight plug-in changes between embedded mode and full-screen mode:

  • In embeddedmode, the plug-in displays in the Web browser window.

  • In full-screen mode, the plug-in displays on top of all other applications.

When the Silverlight plug-in displays in embedded mode, the plug-in is contained within the browser window. When the Silverlight plug-in displays in full-screen mode, the plug-in resizes to the current resolution of the display and overlays all other applications, including the browser. The following illustration show the differences between embedded mode and full-screen mode.

Silverlight plug-in displaying as embedded and full-screen mode

Embedded mode

NoteNote:

Silverlight does not support automatic layout of elements based on run-time size changes to the plug-in area. This means that applications have to provide logic to resize themselves appropriately when the plug-in size changes.

NoteNote:

You can add or reassign event handlers for the FullScreenChanged event at run-time; however, there is a naming inconsistency. For the object element, the property / parameter name is onfullscreenchanged. To adjust the handler name at run-time, for the JavaScript API, you set silverlightObject.content.onfullscreenchange (note the missing "d").

Applies To

Silverlight Plug-in