ViewInfo.IsDefault Property
Gets or sets a value that indicates whether the view is defined as the default view in a Microsoft InfoPath 2010 form.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Property IsDefault As Boolean
Get
Set
'Usage
Dim instance As ViewInfo
Dim value As Boolean
value = instance.IsDefault
instance.IsDefault = value
bool IsDefault { get; set; }
Property Value
Type: System.Boolean
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.
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.
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;