Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
Silverlight 3
HtmlWindow Class
Collapse All/Expand All Collapse All
.NET Framework Class Library for Silverlight
HtmlWindow Class

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
Visual Basic (Usage)
Dim instance As HtmlWindow
C#
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.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker