XmlForm.Template Property (Microsoft.Office.InfoPath)
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
The Template property provides access to information about the form definition (.xsf) file (the manifest) of the form template associated with the form, including access to a System.Xml.XPath.XPathNavigator object that can be used to work with the source XML of the .xsf file.
The Template property provides similar functionality to the Solution property of the XDocument object in the COM/Scripting object model, and to the Solution property of the _XDocument2 interface of the InfoPath 2003-compatible managed code object model.
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.
In the following example, the Template property of the XmlForm class is used to return a reference to the FormTemplate object. The Manifest property of the FormTemplate object is then used to return a System.Xml.XPath.XPathNavigator object which is used to display the XML contents of the .xsf file in a message box.