This documentation is archived and is not being maintained.

XpsSignatureDefinition Class

Represents an XpsDocument digital signature.


Namespace:  System.Windows.Xps.Packaging
Assembly:  ReachFramework (in ReachFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

public class XpsSignatureDefinition
<XpsSignatureDefinition .../>

The XpsSignatureDefinition type exposes the following members.

Public methodXpsSignatureDefinitionInitializes a new instance of the XpsSignatureDefinition class.

Public propertyCultureGets or sets the CultureInfo of the signature.
Public propertyHasBeenModifiedGets or sets a value that indicates whether unwritten property changes exist for the XpsSignatureDefinition class and must be written to the package's stream.
Public propertyIntentGets or sets the string value of the signature intention agreement that the signer is signing against.
Public propertyRequestedSignerGets or sets the identity of the person who is requested to sign (or has signed) the package.
Public propertySignByGets or sets the date and time by which the requested signer must sign the parts of the specified document.
Public propertySigningLocaleGets or sets the legal jurisdiction where the package is signed.
Public propertySpotIdGets or sets a unique identifier for this XpsSignatureDefinition.
Public propertySpotLocationGets or sets the location that specifies where to display the visible digital signature in an XML Paper Specification (XPS) document.

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

For more information about signature definitions in XPS packages, see Chapter 10 in the XML Paper Specification (XPS) available for download at

For information about Package digital signatures, see the MSDN article Digital Signing Framework of the Open Packaging Conventions available at

For information about XPS see the XML Paper Specification (XPS) available for download at

The following example shows how to create and set the properties of an XpsSignatureDefinition.

        private void SignatureDefinitionCommandHandler(object sender, RoutedEventArgs e)
            SignatureDefinition sigDefDialog = new SignatureDefinition();
            if (sigDefDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                XpsSignatureDefinition signatureDefinition = new XpsSignatureDefinition();
                signatureDefinition.RequestedSigner = sigDefDialog.RequestedSigner.Text;
                signatureDefinition.Intent = sigDefDialog.Intent.Text;
                signatureDefinition.SigningLocale = sigDefDialog.SigningLocale.Text;
                    signatureDefinition.SignBy = DateTime.Parse(sigDefDialog.SignBy.Text);
                catch (FormatException)
                signatureDefinition.SpotId = Guid.NewGuid();
                IXpsFixedDocumentSequenceReader docSeq = _xpsDocument.FixedDocumentSequenceReader; //_xpsDocument is type System.Windows.Xps.Packaging.XpsDocument
                IXpsFixedDocumentReader doc = docSeq.FixedDocuments[0];

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.