This event handler will run only in fully trusted form templates. Signature thisSignature = e.SignedDataBlock.Signatures.CreateSignature(); ...

// This event handler will run only in fully trusted form templates.

Signature thisSignature = e.SignedDataBlock.Signatures.CreateSignature();

// To add other pieces of information to sign, modify the
// signature template returned by
// thisSignature.SignatureBlockXmlNode.
// Write your code here.

thisSignature.Sign();
e.SignatureWizard = false;