Back to Devexpress

HyperlinkCollection.Create(DocumentPosition, Int32) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-hyperlinkcollection-dot-create-x28-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-documentposition-system-dot-int32-x29.md

latest2.9 KB
Original Source

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.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
Hyperlink Create(
    DocumentPosition start,
    int length
)
vb
Function Create(
    start As DocumentPosition,
    length As Integer
) As Hyperlink

Parameters

NameTypeDescription
startDocumentPosition

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.

|

Returns

TypeDescription
Hyperlink

A Hyperlink interface exposing the created hyperlink.

|

Remarks

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.

Tip

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

See Also

HyperlinkCollection Interface

HyperlinkCollection Members

DevExpress.XtraRichEdit.API.Native Namespace