Silverlight.Windowless Property
Updated: January 2009
Gets (or sets in initialization only) a value that specifies whether the Silverlight plug-in displays as a windowless plug-in. (Applies to Windows versions of Silverlight only.)
Assembly: System.Web.Silverlight (in System.Web.Silverlight.dll)
[BrowsableAttribute(true)] [ThemeableAttribute(true)] public virtual bool Windowless { get; set; }
Property Value
Type: System.Booleantrue if the Silverlight plug-in displays as a windowless plug-in; otherwise, false. The default is false.
This property can be set only in initialization and is read-only thereafter. 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 PluginBackground. 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.
-
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.
-
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
The second bullet point in the list of limitations is ambiguous. The Silverlight plug-in will intercept all mouse input only if it is the top layer. If you add a layer of HTML on top of a windowless Silverlight plug-in, the HTML will intercept the mouse input.
I will update the documentation for the next refresh. I have also posted some clarifications about windowless mode (including this clarification) to the Silverlight SDK blog. See http://blogs.msdn.com/silverlight_sdk/archive/2008/11/12/limitations-of-windowless-mode-for-silverlight.aspx.
- 11/19/2008
- Karl Erickson