WindowCollection.Item Property

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
    Get
'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
    Type: System.Int32

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

Property Value

Type: Microsoft.Office.InfoPath.Window
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 InfoPath Filler.

Examples

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