Share via


_XDocument4.View property

Gets a reference to the ViewObject associated with a Microsoft InfoPath form.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property View As ViewObject
    Get
'Usage
Dim instance As _XDocument4
Dim value As ViewObject

value = instance.View
ViewObject View { get; }

Property value

Type: Microsoft.Office.Interop.InfoPath.ViewObject

Implements

_XDocument3.View

Remarks

The ViewObject object accessed by the View property represents the view that is currently active in an InfoPath form. After you have set a reference to the ViewObject object, you can access any of its properties and methods to programmatically interact with the view.

Examples

In the following example, the View property of the XDocument object is used to set a reference to the View object; then, using the Name property of the ViewObject object, it displays the name of the view in a message box:

thisXDocument.UI.Alert("View name: " + thisXDocument.View.Name);

See also

Reference

_XDocument4 interface

_XDocument4 members

View overload

Microsoft.Office.Interop.InfoPath namespace