Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

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)

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

Community Additions

Show:
© 2015 Microsoft