Export (0) Print
Expand All

XpsSignatureDefinition.SpotId Property

Gets or sets a unique identifier for this XpsSignatureDefinition.

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

public Nullable<Guid> SpotId { get; set; }

Property Value

Type: System.Nullable<Guid>
A (Nullable) Guid that represents the ID of the signature definition. The default value is null.

To link a Signature element to this XpsSignatureDefinition, you must set the Id attribute of the Signature to the value of the SpotId property. For more information about Signature elements, see the Open Packaging Conventions schema.

For more information about the SpotID attribute of the SignatureDefinition element in an XML Paper Specification (XPS) package, 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, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft