Edit

Share via


FormTemplate Class

Definition

Represents a form template.

public ref class FormTemplate abstract
public abstract class FormTemplate
type FormTemplate = class
Public MustInherit Class FormTemplate
Inheritance
FormTemplate

Examples

In the following example, a reference is set to the FormTemplate object for the current form template, then the code displays the values of the Version, CacheId, and Uri properties of the form template.

FormTemplate myTemplate = this.Template;

string templateProperties = "Version: " + myTemplate.Version +
   "\nCacheId: " + myTemplate.CacheId +
   "\nUri: " + myTemplate.Url.ToString();
MessageBox.Show(templateProperties);
Dim myTemplate As FormTemplate  = Me.Template

Dim templateProperties As String = "Version: " & myTemplate.Version & _
   vbNewLine & "CacheId: " & myTemplate.CacheId & _
   vbNewLine & "Uri: " + myTemplate.Url.ToString()
MessageBox.Show(templateProperties)

Remarks

The FormTemplate class implements properties for getting information about a form template, including its version number, its cache identifier, the Uniform Resource Identifier (URI) it was loaded from, and an XPathNavigator object positioned at the root of its form definition (.xsf) file. The FormTemplate class also implements a method for opening a file contained within the form template .xsn file.

A FormTemplate object that represents the form template associated with the current form is accessed through the Template property of the XmlForm class.

Constructors

FormTemplate()

Properties

CacheId

Gets the form template cache identifier.

Manifest

Gets an XPathNavigator object positioned at the root of the form template's form definition (.xsf) file.

Uri

Gets the Uniform Resource Identifier (URI) of a form template.

Version

Gets the version of a form template.

Methods

OpenFileFromPackage(String)

Opens a file contained within the form template (.xsn) file.

Applies to