Share via


View.ViewInfo property

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
    Get
'Usage
Dim instance As View
Dim value As ViewInfo

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

Property value

Type: Microsoft.Office.InfoPath.ViewInfo
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 InfoPath Filler or in a Web browser.

Examples

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