Export (0) Print
Expand All

XpsSignatureDefinition.SignBy Property

Gets or sets the date and time by which the requested signer must sign the parts of the specified document.

Namespace:  System.Windows.Xps.Packaging
Assembly:  ReachFramework (in ReachFramework.dll)

public Nullable<DateTime> SignBy { get; set; }

Property Value

Type: System.Nullable<DateTime>
A (Nullable) DateTime that represents the deadline by which the signer must sign the package. The default value is null.

For more information about the SignBy element of signature definitions in XML Paper Specification (XPS) packages, see the XPS specification, which you can obtain at XPS: Specification and License Downloads.

The following example shows how to set this property.


        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();
            }
        }

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft