ViewInfo.Name Property

Gets the name of the view that is associated with the ViewInfo object.

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

Syntax

'Declaration
'Usage

Property Value

The name of the view that is associated with the ViewInfo object.

Remarks

The name of the ViewInfo object is the same as the name of the view that it represents. The name of the ViewInfo object can also be used as the argument to the Item(String) property of the ViewInfoCollection class.

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

In the following example, the Name property of the ViewInfo class is used to display the name of the first view in the ViewInfoCollection in a message box.

ViewInfo myViewInfo = this.ViewInfos[0];
MessageBox.Show("View name: " + myViewInfo.Name);
Dim myViewInfo As ViewInfo  = Me.ViewInfos(0)
MessageBox.Show("View name: " & myViewInfo.Name)

See Also

Reference

ViewInfo Class
ViewInfo Members
Microsoft.Office.InfoPath Namespace