Share via


WindowCollection.Item Property (Microsoft.Office.InfoPath)

Gets a reference to the specified Window object in the WindowCollection object.

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

Syntax

'Declaration
Public MustOverride ReadOnly Default Property Item ( _
    index As Integer _
) As Window
'Usage
Dim instance As WindowCollection
Dim index As Integer
Dim value As Window

value = instance(index)
public abstract Window this [
    int index
] { get; }

Parameters

  • index
    The zero-based index of the Window object to return.

Property Value

A Window object from the WindowCollection object that corresponds to the specified index value.

Remarks

The value passed for the index parameter must be a number from 0 to the value of the collection's Count property minus 1.

After you have set a reference to the Window object that the Item property returns, you can access any of its properties and methods.

This member can be accessed without restrictions.

This type or member can be accessed only from code running in forms opened in Microsoft Office InfoPath 2007.

Example

Because the Item property is the default property of the WindowsCollection class, it can be used as follows.

Window firstWindow = this.Application.Windows[0];
Dim firstWindow As Window  = Me.Application.Windows(0)

See Also

Reference

WindowCollection Class
WindowCollection Members
Microsoft.Office.InfoPath Namespace