View.ViewInfo Property (Microsoft.Office.InfoPath)

Gets a reference to a ViewInfo object associated with the view.

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

Syntax

'Declaration
Public MustOverride ReadOnly Property ViewInfo As ViewInfo
'Usage
Dim instance As View
Dim value As ViewInfo

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

Property Value

A ViewInfo associated with the current view.

Remarks

The ViewInfo object provides properties that can be used to get the name of a view and determine whether its name is hidden on the View menu.

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.

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

Example

The following example uses the ViewInfo property of the View class to get the name for the current view.

string myViewName = this.CurrentView.ViewInfo.Name;
Dim myViewName As String = Me.CurrentView.ViewInfo.Name

See Also

Reference

View Class
View Members
Microsoft.Office.InfoPath Namespace