Skip to main content
.NET Framework 4.5.2+

HyperlinkCollection.Create(DocumentPosition, Int32) Method

Creates a hyperlink for the document range, starting at the specified position, and extending through the specified length and adds it to the collection.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core


Hyperlink Create(
    DocumentPosition start,
    int length


Name Type Description
start DocumentPosition

A DocumentPosition object specifying a starting position of a range associated with the hyperlink.

length Int32

An integer specifying the length of a hyperlink’s range.


Type Description

A Hyperlink interface exposing the created hyperlink.


The Create method creates a hyperlink with the specified Hyperlink.Range and other characteristics set to null. Use Hyperlink properties to adjust the newly created hyperlink as required.

To remove a hyperlink, use the HyperlinkCollection.Remove method.


Use the Shape.AddHyperlink method to associate a hyperlink with a Shape object. Note that this hyperlink is not added to the HyperlinkCollection.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Create(DocumentPosition, Int32) method.


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