# UserDefinedPropertyDictionary Class

> An instance of the UserDefinedPropertyDictionary class contains all user-defined document properties contained in a loaded document or which will be saved in a document. The UserDefinedPropertyDictionary class is used with the LoadSettings.UserDefinedDocumentProperties and SaveSettings.UserDefinedDocumentProperties properties. Each entry in the dictionary is a key/value pair, where the key is the name of the document property and the value is the document property's value. The foreach statement of the C# language (for each in Visual Basic) returns an object of the type of the elements in the collection. Since each element is a key/value pair, the element type is System.Collections.DictionaryEntry. The name must be of the type System.String and is limited to 255 characters. The value can be of the type System.String, System.Boolean, System.Int32 or System.Double.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **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
- **Inherits:** `System.Collections.DictionaryBase`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > UserDefinedPropertyDictionary Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/#members)

---

## In This Section

- [UserDefinedPropertyDictionary.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/add-method/llms.txt): Adds a new property to the dictionary.
- [UserDefinedPropertyDictionary Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/constructor/llms.txt): Initializes a new instance of the UserDefinedPropertyDictionary class.
- [UserDefinedPropertyDictionary.Contains Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/contains-method/llms.txt): Determines whether the dictionary contains a property with the specified name.
- [UserDefinedPropertyDictionary.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/item-property/llms.txt): Gets a document property from the dictionary. In C# this property is the indexer for the UserDefinedPropertyDictionary class. The property returns an object of the type System.String, System.Boolean, System.Int32 or System.Double which is the value associated with the specified name.
- [UserDefinedPropertyDictionary.Names Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/names-property/llms.txt): Gets a collection of all property names the dictionary contains.
- [UserDefinedPropertyDictionary.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/remove-method/llms.txt): Removes a document property from the dictionary.
- [UserDefinedPropertyDictionary.Values Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/values-property/llms.txt): Gets a collection of all property values the dictionary contains.

---

## Nearby

- **Previous:** [TrackedChangeEventArgs.TrackedChange Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/trackedchangeeventargs/trackedchange-property/llms.txt)
- **Next:** [UserDefinedPropertyDictionary.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/add-method/llms.txt)
