C# Класс ApiExamples.Hyperlink

This "facade" class makes it easier to work with a hyperlink field in a Word document. A hyperlink is represented by a HYPERLINK field in a Word document. A field in Aspose.Words consists of several nodes and it might be difficult to work with all those nodes directly. Note this is a simple implementation and will work only if the hyperlink code and name each consist of one Run only. [FieldStart][Run - field code][FieldSeparator][Run - field result][FieldEnd] The field code contains a string in one of these formats: HYPERLINK "url" HYPERLINK \l "bookmark name" The field result contains text that is displayed to the user.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
FindNextSibling Node
GetTextSameParent string
Hyperlink System
RemoveSameParent void
UpdateFieldCode void

Приватные методы

Метод Описание
FindNextSibling ( Node startNode, NodeType nodeType ) : Node

Goes through siblings starting from the start node until it finds a node of the specified type or null.

GetTextSameParent ( Node startNode, Node endNode ) : string

Retrieves text from start up to but not including the end node.

Hyperlink ( FieldStart fieldStart ) : System
RemoveSameParent ( Node startNode, Node endNode ) : void

Removes nodes from start up to but not including the end node. Start and end are assumed to have the same parent.

UpdateFieldCode ( ) : void