Provides the managed representation of the JavaScript window object.
Public NotInheritable Class HtmlWindow _ Inherits HtmlObject
Dim instance As HtmlWindow
public sealed class HtmlWindow : HtmlObject
When the Silverlight plug-in's enableHtmlAccess property is set to false, any attempt to use the HtmlWindow class fails with a NotSupportedException stating that the feature is disabled.
For information about the JavaScript window object, see the window object in the dynamic HTML (DHTML) documentation.
For information about the enableHtmlAccess property, see Security Settings in HTML Bridge.
If you are using Safari version 2 or 3 on a Macintosh computer, comparing two or more managed HtmlWindow references that point to the same Document Object Model (DOM) window reference returns false.
The following example accesses a page that has one IFRAME. HTML Bridge methods are used to get two references to the IFRAME.
HtmlWindow htmlWin1 = HtmlPage.Window; HtmlWindow htmlWin2 = HtmlPage.Window;
The following comparison returns false on Safari 2 or 3 on a Macintosh computer:
bool areEqual = (htmlWin1== htmlWin2);
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.