Edit

Share via


XmlForm.Template Property

Definition

Gets a reference to the FormTemplate object that represents the manifest (.xsf) of the form template associated with the form.

public:
 abstract property Microsoft::Office::InfoPath::FormTemplate ^ Template { Microsoft::Office::InfoPath::FormTemplate ^ get(); };
public abstract Microsoft.Office.InfoPath.FormTemplate Template { get; }
member this.Template : Microsoft.Office.InfoPath.FormTemplate
Public MustOverride ReadOnly Property Template As FormTemplate

Property Value

A FormTemplate that represents the manifest (.xsf) of the form template associated with the form.

Examples

In the following code 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.

MessageBox.Show(this.Template.Manifest.OuterXml.ToString()); MessageBox.Show(Me.Template.Manifest.OuterXml.ToString())

Remarks

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.

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 InfoPath Filler or in a Web browser.

Applies to