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.
The XpsSignatureDefinition type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | XpsSignatureDefinition | Initializes a new instance of the XpsSignatureDefinition class. |
| Name | Description | |
|---|---|---|
![]() | Culture | Gets or sets the CultureInfo of the signature. |
![]() | HasBeenModified | Gets or sets a value that indicates whether unwritten property changes exist for the XpsSignatureDefinition class and must be written to the package's stream. |
![]() | Intent | Gets or sets the string value of the signature intention agreement that the signer is signing against. |
![]() | RequestedSigner | Gets or sets the identity of the person who is requested to sign (or has signed) the package. |
![]() | SignBy | Gets or sets the date and time by which the requested signer must sign the parts of the specified document. |
![]() | SigningLocale | Gets or sets the legal jurisdiction where the package is signed. |
![]() | SpotId | Gets or sets a unique identifier for this XpsSignatureDefinition. |
![]() | SpotLocation | Gets or sets the location that specifies where to display the visible digital signature in an XML Paper Specification (XPS) document. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns 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;
try
{
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];
doc.AddSignatureDefinition(signatureDefinition);
doc.CommitSignatureDefinition();
InitializeSignatureDisplay();
}
}
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
