Skip to main content

DocumentCustomProperties.Item[String] Property

Gets or sets the value of a custom property.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

object this[string name] { get; set; }

Parameters

Name Type Description
name String

A name of the custom property.

Property Value

Type Description
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 Type Custom Property Type
String Text
Integer Number
Double Number
Boolean Yes or no
Bookmark Text 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