Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.
The SignatureCollection object for a form or a set of signable data is accessed through the Signatures property of the SignedDataBlock object that represents that set of signable data.
If the form template is configured to enable digital signatures for the entire form, there is only one SignedDataBlock object for all the data in the form, and the SignatureCollection object contains all digital signatures applied to the entire form.
If the form template is configured to enable digital signatures for specific data in the form, there is a SignedDataBlock object for each set of signable data configured in the form template. In this case, each SignedDataBlock object contains the digital signatures applied to the set of signable data that is associated with the SignedDataBlock object.
The SignatureCollection class provides the CreateSignature method, which creates a Signature object (getting a snapshot of the view plus additional signature information) without adding it to the form. To add this signature to the form, call the Sign method of the Signature class. You can only call the CreateSignature method from the event handler for the Sign event, which only a fully trusted form template can execute.
The following example returns the SignatureCollection object that represents the signatures on the first set of signable data, or, if signing is enabled for the entire form, will return the SignatureCollection object for signatures on the entire form.