Show All

# Window Property (View Object)

A read-only property that returns a reference to the window object associated with a view.

expression.Window

expression Required. An expression that returns a reference to the View object.

## Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

## Remarks

The Window object returned by the Window property represents the currently active Microsoft Office InfoPath 2003 window. It can also be accessed through the Windows collection.

## Example

In the following example, the Window property of the View object is used to set a reference to the first task pane contained in the TaskPanes collection:

    var objTaskPane;

    objTaskPane = XDocument.View.Window.TaskPanes(0);

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp