XDocument.Host Property

InfoPath Developer Reference

Gets a reference to the host application that code running in a hosted instance of InfoPath can use to access the object model of the host application. Read-only

Version Information
 Version Added:  InfoPath 2007

Syntax

expression.Host

expression   An expression that returns an XDocument object.

Return Value
Object

Remarks

This property is only used for scenarios where InfoPath is hosted as a control in another application and code running in InfoPath needs to access the object model of the host application. By default, the value of this property is set to null.

For information about hosting InfoPath in another application, see Hosting the InfoPath 2007 Form Editing Environment in a Custom Windows Form Application.

Remarks

Security Level 2: 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.