Skip to main content

SubDocument.CreateCustomMark(DocumentPosition, Object) Method

Obsolete. Creates a custom mark at the specified position and associates specified data with it.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

[Obsolete("This method has become obsolete. Use the 'DevExpress.XtraRichEdit.API.Native.CustomMarkCollection.Create(DocumentPosition position, object userData)' method instead.")]
CustomMark CreateCustomMark(
    DocumentPosition position,
    object userData
)
<Obsolete("This method has become obsolete. Use the 'DevExpress.XtraRichEdit.API.Native.CustomMarkCollection.Create(DocumentPosition position, object userData)' method instead.")>
Function CreateCustomMark(
    position As DocumentPosition,
    userData As Object
) As CustomMark

Parameters

Name Type Description
position DocumentPosition

A DocumentPosition specifying the position being marked.

userData Object

An arbitrary object that will be associated with the created mark.

Returns

Type Description
CustomMark

A CustomMark object representing a position marker in the document.

Remarks

Use the SubDocument.CreateCustomMark method to create a mark, add it to the SubDocument.CustomMarks collection and visualize it by handling the RichEditControl.CustomMarkDraw event.

NOTE

A custom mark is linked to a certain text run, and moves with the content if a text is deleted or inserted before the marked position. It is not saved when the document is exported to any format, and you should provide a way to create it again when a document is loaded.

See Also