Export (0) Print
Expand All

XpsSignatureDefinition Class

Represents an XpsDocument digital signature.

System.Object
  System.Windows.Xps.Packaging.XpsSignatureDefinition

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

'Declaration
Public Class XpsSignatureDefinition
<XpsSignatureDefinition .../>

The XpsSignatureDefinition type exposes the following members.

  NameDescription
Public methodXpsSignatureDefinitionInitializes a new instance of the XpsSignatureDefinition class.
Top

  NameDescription
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.
Top

  NameDescription
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.)
Top

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 Sub SignatureDefinitionCommandHandler(ByVal sender As Object, ByVal e As RoutedEventArgs)
			Dim sigDefDialog As New SignatureDefinition()
			If sigDefDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
				Dim signatureDefinition As New XpsSignatureDefinition()
				signatureDefinition.RequestedSigner = sigDefDialog.RequestedSigner.Text
				signatureDefinition.Intent = sigDefDialog.Intent.Text
				signatureDefinition.SigningLocale = sigDefDialog.SigningLocale.Text
				Try
					signatureDefinition.SignBy = Date.Parse(sigDefDialog.SignBy.Text)
				Catch e1 As FormatException
				End Try
				signatureDefinition.SpotId = Guid.NewGuid()
				Dim docSeq As IXpsFixedDocumentSequenceReader = _xpsDocument.FixedDocumentSequenceReader '_xpsDocument is type System.Windows.Xps.Packaging.XpsDocument
				Dim doc As IXpsFixedDocumentReader = docSeq.FixedDocuments(0)
				doc.AddSignatureDefinition(signatureDefinition)
				doc.CommitSignatureDefinition()
				InitializeSignatureDisplay()
			End If
		End Sub

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, 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.

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