Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Document.CustomProperties Property

Provides access to a collection of the document’s custom properties.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

DocumentCustomProperties CustomProperties { get; }

#Property Value

Type Description
DocumentCustomProperties

A DocumentCustomProperties object that stores document’s custom properties.

#Example

View Example

server.CreateNewDocument();
Document document = server.Document;
document.BeginUpdate();
document.Fields.Create(document.AppendText("\nMyNumericProperty: ").End, "DOCVARIABLE CustomProperty MyNumericProperty");
document.Fields.Create(document.AppendText("\nMyStringProperty: ").End, "DOCVARIABLE CustomProperty MyStringProperty");
document.Fields.Create(document.AppendText("\nMyBooleanProperty: ").End, "DOCVARIABLE CustomProperty MyBooleanProperty");
document.EndUpdate();

document.CustomProperties["MyNumericProperty"]= 123.45;
document.CustomProperties["MyStringProperty"]="The Final Answer";
document.CustomProperties["MyBooleanProperty"]=true;

server.CalculateDocumentVariable += DocumentPropertyDisplayHelper.OnCalculateDocumentVariable;
document.Fields.Update();

The following code snippets (auto-collected from DevExpress Examples) contain references to the CustomProperties property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also