Share via


XDocument.HostName Property

InfoPath Developer Reference

Gets the name of the application hosting InfoPath as a control. Read-only

Version Information
 Version Added:  InfoPath 2007

Syntax

expression.HostName

expression   An expression that returns an XDocument object.

Return Value
String

Remarks

This property is intended for use in scenarios where InfoPath is hosted as a control in another application and code running in InfoPath needs to access the name of the host application. Typically the host application name returned will be used in the title bar text of dialog boxes instead of "Microsoft Office InfoPath".

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 0: Can be accessed without restrictions.