Export (0) Print
Expand All

ViewInfo2.IsDefault Property

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

This property is not CLS-compliant.  

Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in microsoft.office.interop.infopath.semitrust.dll)

Property Value

true if the view is the default view; otherwise false.

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.

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;

Community Additions

Show:
© 2014 Microsoft