_XDocument3.View Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a reference to the ViewObject associated with a Microsoft Office InfoPath form.
public:
property Microsoft::Office::Interop::InfoPath::ViewObject ^ View { Microsoft::Office::Interop::InfoPath::ViewObject ^ get(); };
public Microsoft.Office.Interop.InfoPath.ViewObject View { get; }
member this.View : Microsoft.Office.Interop.InfoPath.ViewObject
Public ReadOnly Property View As ViewObject
Property Value
A reference to the ViewObject associated with a form.
Implements
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.<span class="label">View</span>.Name);
Remarks
The ViewObject object that the View property accesses 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.