Export (0) Print
Expand All

XpsSignatureDefinition.SigningLocale Property

Gets or sets the legal jurisdiction where the package is signed.

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

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

Property Value

Type: System.String
A String that represents the jurisdiction, for example, "State of Utah, United States." The default value is null.

This property corresponds to the SigningLocation element of signature definitions in XML Paper Specification (XPS) packages. Notice the difference in the names.

The original producer of the XML Paper Specification (XPS) package can set this property. Optionally, the signer can set the property at the time of signing the package if no one else has already signed.

For more information about the SigningLocation element, 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