Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
XpsSignatureDefinition Class

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 the default hash function. (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 http://go.microsoft.com/fwlink/?LinkID=65761.

For information about Package digital signatures, see the MSDN article Digital Signing Framework of the Open Packaging Conventions available at http://go.microsoft.com/fwlink/?LinkId=74494.

For information about XPS see the XML Paper Specification (XPS) available for download at http://go.microsoft.com/fwlink/?LinkID=65761.

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.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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