This documentation is archived and is not being maintained.

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)

public abstract ViewInfo ViewInfo { get; }

Property Value

A ViewInfo associated with the current view.

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.

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
Show: