Back to Devexpress

DocumentCustomProperties.Item[String] Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-documentcustomproperties-dot-item-x28-system-dot-string-x29.md

latest2.4 KB
Original Source

DocumentCustomProperties.Item[String] Property

Gets or sets the value of a custom property.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
object this[string name] { get; set; }
vb
Property Item(name As String) As Object

Parameters

NameTypeDescription
nameString

A name of the custom property.

|

Property Value

TypeDescription
Object

An object that is the value of the property specified by its name.

|

Remarks

When assigning a value, creates the property if the property with the specified name does not exist. The type of the created property depends on the type of the assigned value, as illustrated below.

Value TypeCustom Property Type
StringText
IntegerNumber
DoubleNumber
BooleanYes or no
BookmarkText linked to a bookmark

If the property exists, assigns the specified value to it and changes the property’s type according to the type of the assigned value.

When obtaining the value, returns a System.Object instance. You can use the GetType() method to determine the type of the returned value. Cast it to a proper type for subsequent use.

Note

You can use DocumentCustomProperties.Add method overrides to create a new property and specify its value. However, if the property already exists, Add methods throw an exception.

See Also

DocumentCustomProperties Interface

DocumentCustomProperties Members

DevExpress.XtraRichEdit.API.Native Namespace