Provides the managed representation of the JavaScript window object.
Namespace:
System.Windows.Browser
Assembly:
System.Windows.Browser (in System.Windows.Browser.dll)
Visual Basic (Declaration)
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);
System..::.Object
System.Windows.Browser..::.ScriptObject
System.Windows.Browser..::.HtmlObject
System.Windows.Browser..::.HtmlWindow
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Reference