Share via


ViewInfo2.IsDefault property

Gets or sets a value that indicates whether the view is defined as the default view in a Microsoft InfoPath form.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Property IsDefault As Boolean
    Get
    Set
'Usage
Dim instance As ViewInfo2
Dim value As Boolean

value = instance.IsDefault

instance.IsDefault = value
bool IsDefault { get; set; }

Property value

Type: System.Boolean

Implements

ViewInfo.IsDefault

Remarks

The IsDefault property of the ViewInfoObject object can be used to determine whether a view is the default view, and it can be used to programmatically change the default view before the first view is loaded.

Examples

In the following example, the IsDefault property is used to make the second view contained in the ViewInfosCollection collection the default view:

thisXDocument.ViewInfos[1].IsDefault = true;

See also

Reference

ViewInfo2 interface

ViewInfo2 members

IsDefault overload

Microsoft.Office.Interop.InfoPath namespace