Export (0) Print
Expand All

Windowless Property

Determines whether the Silverlight plug-in (Windows version) displays as a window-less plug-in.

Scripting (Instantiation)
Silverlight.CreateObject(,,,{isWindowless:'value'})

-or-

Silverlight.CreateObjectEx({properties:{isWindowless:'value'}})
Scripting (Runtime)
value = silverlightObject.settings.Windowless

Property Value

Boolean

Gets (or sets in initialization only) whether the Silverlight plug-in displays as a window-less or windowed plug-in.

This property is settable only as an initialization parameter, and is read-only for scripting thereafter. The default value is false.

Remarks

This property is available on the settings sub-object of a Silverlight plug-in instance.

For Windows, if the value is set to true as an initialization parameter and the Background property value specifies an alpha value, the window-less mode enables HTML overlay where the HTML on the page blends with the contents of the plug-in, including its background.

For Macintosh, this property has no effect either in initialization or at runtime. The window behavior for Macintosh is to always act as window-less.

Performance Tip  Setting an alpha channel value for full or partial transparency has possible performance consequences, particularly on certain client environments. See Performance Tips.

Performance Tip  Only set the Windowless property to true when necessary. It is expensive and it can cause tearing during animations. See Performance Tips.

The windowless initialization parameter specifies whether the plug-in displays as a window-less plug-in. Note that the CreateObject/CreateObjectEx functions use a slight name variation, and call this parameter isWindowless. For more information on how this parameter is set during plug-in initialization, see Using CreateSilverlight.js and Silverlight.js.

Examples

The following JavaScript example demonstrates instantiation in which the two Silverlight plug-ins are established through CreateSilverlight.js--the first one with the isWindowless initialization parameter set to false; the second, with isWindowless set to true:

JavaScript
isWindowless:'false',       // Display as windowed plug-in.
background:'#80008080',     // Background color of plug-in (alpha + RGB).

JavaScript
isWindowless:'true',       // Display as window-less plug-in.
background:'#80008080',    // Background color of plug-in (alpha + RGB).

Notice the displayed output of the preceding plug-in initializations. The background of the first Silverlight plug-in is opaque. The background of the second Silverlight plug-in is blended with the background image of the HTML page.

Windowless property set on two Silverlight plug-ins

Windowless property set on two Silverlight plug-ins

The following illustration shows a TextBlock displayed as a window-less plug-in on a Microsoft Virtual Earth mashup. The Background value of the plug-in is "#00000000", which is totally transparent. In addition, the Opacity of the TextBlock is set to 0.7, which allows the map underneath to partially show through the text.

TextBlock displayed as a window-less plug-in

TextBlock displayed as a window-less plug-in

Applies To

Silverlight Plug-in

See Also

Silverlight Object Models and Scripting to the Silverlight Plug-in
Instantiating a Silverlight Plug-in (Using CreateSilverlight.js and Silverlight.js)
Background

Community Additions

Show:
© 2015 Microsoft