TX Text Control .NET for Windows Forms

UserDefinedDocumentProperties Property

Property|Introduced in 24.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Sets a dictionary with all user-defined document properties which will be saved in the document. The property's value must be an object of the type UserDefinedPropertyDictionary.

Syntax

public UserDefinedPropertyDictionary UserDefinedDocumentProperties { get; set; }

Examples

The following example attaches review metadata as user-defined document properties.

UserDefinedPropertyDictionary properties = new();
properties.Add("ReviewStatus", "Approved");
properties.Add("Department", "Finance");

SaveSettings saveSettings = new();
saveSettings.UserDefinedDocumentProperties = properties;
textControl.Save("approved-report.docx", StreamType.WordprocessingML, saveSettings);