Window Property
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

View.Window Property (Microsoft.Office.Interop.InfoPath.SemiTrust)

Gets a reference to the window associated with the view.

This property is not CLS-compliant.  

Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in

WindowObject Window { get; }

The WindowObject object returned represents the currently active Microsoft Office InfoPath 2007 window. It can also be accessed through the WindowsCollection collection.


This member 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.

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:


TaskPane taskPane;
taskPane = thisXDocument.View.Window.TaskPanes[0];
© 2015 Microsoft