XpsSignatureDefinition.RequestedSigner Property


Gets or sets the identity of the person who is requested to sign (or has signed) the package.

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

public string RequestedSigner { get; set; }

Property Value

Type: System.String

A String that represents the signer, for example, "Mary Jones, Marketing Dept." The default value is null.

This property corresponds to the SignerName attribute of the SignatureDefinition element in an XML Paper Specification (XPS) package. Notice the difference in the names.

For more information about the SignerName attribute, see chapter 10 of the XML Paper Specification (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;
            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
Available since 3.0
Return to top