Export (0) Print
Expand All

XpsSignatureDefinition.Intent Property

Gets or sets the string value of the signature intention agreement that the signer is signing against.

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

public string Intent { get; set; }
<object Intent="string" .../>

Property Value

Type: System.String
A String that represents the intention agreement; for example, "I have read and agree." The default value is null.

For more information about the Intent element of signature definitions in XML Paper Specification (XPS) packages, see chapter 10 in 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;
                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