# UserDefinedPropertyDictionary.Add Method

> Adds a new property to the dictionary.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > UserDefinedPropertyDictionary.Add Method
- **475 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/add-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/add-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/add-method/llms-full.txt

---

### Description

Adds a new property to the dictionary.

### Syntax

```csharp
public void Add(string name, object value);
```

```vbnet
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.

```csharp
UserDefinedPropertyDictionary userDefinedPropertyDictionary = new();
userDefinedPropertyDictionary.Add("ReviewStatus", "Approved");
textControl.DocumentSettings.UserDefinedDocumentProperties = userDefinedPropertyDictionary;
```

```vbnet
Dim userDefinedPropertyDictionary As New UserDefinedPropertyDictionary()
userDefinedPropertyDictionary.Add("ReviewStatus", "Approved")
textControl.DocumentSettings.UserDefinedDocumentProperties = userDefinedPropertyDictionary
```

---

## Nearby

- **Previous:** [UserDefinedPropertyDictionary Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/llms-full.txt)
- **Next:** [UserDefinedPropertyDictionary Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/constructor/llms-full.txt)
