Partager via


Windowless (Silverlight Plug-in Object)

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

Gets or sets a value that determines whether the Silverlight plug-in displays as a windowless plug-in. (Applies to Windows versions of Silverlight only.)

Syntax

object Element

<object ...>
  <param name="windowless" value="bool"/>
  ...
</object>

silverlight.js

Silverlight.CreateObject(,,,{windowless:'bool'});
-or-
Silverlight.CreateObjectEx({properties:{windowless:'bool'}});

JavaScript

value = silverlightObject.settings.Windowless;

COM

IXcpControl::Settings gets an IDispatch interface, which you can use to call Windowless.

Managed Code

Property Value

true if the Silverlight plug-in is displayed as a windowless plug-in; false if the Silverlight plug-in is displayed as a windowed plug-in. The default is false.

Remarks

This property can be set only as an initialization parameter and is read-only for all other access models. On Macintosh computers, this property has no effect either at initialization or at run time, and the behavior is always windowless.

In windowless mode, the Silverlight plug-in does not have its own rendering window. Instead, the plug-in content is displayed directly by the browser window. This enables Silverlight content to visually overlap and blend with HTML content if the plug-in and its content both specify background transparency. For more information, see Background (Silverlight Plug-in Object). You can also display HTML content on top of Silverlight content in windowless mode.

Windowless mode is useful to achieve certain effects, but it has significant limitations. Therefore, you should use windowless mode only when it is necessary. In particular, complex animations and high definition video content will not perform well in windowless mode. To compensate, you can adjust the frame rate for Silverlight content by using the MaxFrameRate property. However, you should also test your code with a variety of platforms and browsers when you use windowless mode.

The limitations of windowless mode are as follows:

  • Performance issues. Windowless mode is computationally expensive, especially in combination with a transparent plug-in background. For more information, see Performance Tips.

  • No support for passing mouse input to HTML content that the plug-in overlaps, even if the plug-in has a transparent background. To process mouse input through HTML, the HTML must overlap the Silverlight plug-in.

  • No mouse capture support outside the boundary of the plug-in.

  • No accessibility or IME support.

  • No support for windowless mode in full-screen mode.

  • No support for suppressing popup blockers when using hyperlink navigation to new windows. Also, note that popup blocker suppression is not supported on Safari regardless of the windowing mode.

  • No support for handling UIElement defined drag-and-drop events for purposes of Silverlight as a file drop target.

  • Issues because of browser and platform limitations:

    • Visual tearing in animation and video playback on Windows XP, on Windows Vista with DWM disabled, and in Internet Explorer, regardless of platform.

    • Unreliable rendering when overlapping HTML content in Safari.

    • Focus issues in Mozilla-based browsers. When the focus moves between the plug-in and other plug-ins or HTML controls, multiple controls will sometimes appear to have focus.

NoteNote:

In the earliest versions of the Silverlight.js helper file, the CreateObject and CreateObjectEx functions called their initialization parameter isWindowless. In recent versions, you can use either windowless or isWindowless.