Add Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Adds a new property to the dictionary.
Syntax
public void Add(string name, object value);Public Sub Add(name As String, value As Object)Parameters
| Parameter | Description |
|---|---|
| name | Specifies the document property's name. The name is limited to 255 characters. |
| value | Specifies the document property's value. It can be of the type System.String, System.Boolean, System.Int32 or System.Double. |
Examples
The following example adds review status metadata and assigns the dictionary to the document.
UserDefinedPropertyDictionary userDefinedPropertyDictionary = new();
userDefinedPropertyDictionary.Add("ReviewStatus", "Approved");
textControl.DocumentSettings.UserDefinedDocumentProperties = userDefinedPropertyDictionary;Dim userDefinedPropertyDictionary As New UserDefinedPropertyDictionary()
userDefinedPropertyDictionary.Add("ReviewStatus", "Approved")
textControl.DocumentSettings.UserDefinedDocumentProperties = userDefinedPropertyDictionary