Share via


ViewInfoCollection.Initial Property (Microsoft.Office.InfoPath)

Gets or sets the ViewInfo object that represents the initial view of the form.

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

Syntax

'Declaration
Public MustOverride Property Initial As ViewInfo
'Usage
Dim instance As ViewInfoCollection
Dim value As ViewInfo

value = instance.Initial

instance.Initial = value
public abstract ViewInfo Initial { get; set; }

Property Value

The ViewInfo object that represents the initial view of the form.

Exceptions

Exception type Condition

ArgumentException

The specified ViewInfo object doesn't exist.

Remarks

The ViewInfo object that is returned or set by the Initial property is specified by the value of the InitialView attribute in the processing instructions of the underlying XML document of the form. The value can be set to a valid view and is saved when the form is saved.

This member can be accessed without restrictions.

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

Example

To see an example that uses the Initial property, see the SwitchView(ViewInfo) method topic.

See Also

Reference

ViewInfoCollection Class
ViewInfoCollection Members
Microsoft.Office.InfoPath Namespace