Compartir a través de


XmlForm.Template Property

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

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride ReadOnly Property Template As FormTemplate
    Get
'Usage
Dim instance As XmlForm
Dim value As FormTemplate

value = instance.Template
public abstract FormTemplate Template { get; }

Property Value

Type: Microsoft.Office.InfoPath.FormTemplate
A FormTemplate that represents the manifest (.xsf) of the form template associated with the form.

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.

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())

See Also

Reference

XmlForm Class

XmlForm Members

Microsoft.Office.InfoPath Namespace