New to Telerik UI for WinForms? Start a free 30-day trial

Provides bookmark selection and display options shared by content and page cross-reference fields.

Definition

Constructors

Initializes the bookmark property used by derived reference fields.

C#
public ReferenceFieldBase()

Fields

Identifies the field property that stores the referenced bookmark name.

C#
public static readonly FieldPropertyDefinition BookmarkNameProperty

Text returned when the referenced bookmark is missing or cannot be resolved.

C#
protected static readonly string ReferenceSourceNotFoundError

Properties

Gets or sets the bookmark whose content or location this field references.

C#
[XamlSerializable]
public string BookmarkName { get; set; }

Gets or sets whether the reference result is wrapped in a hyperlink to the referenced bookmark.

C#
[XamlSerializable(false)]
public bool ShouldCreateHyperlink { get; set; }

Gets or sets whether the result describes the bookmark's position relative to this field instead of its content. Derived field types determine the exact positional text.

C#
[XamlSerializable(false)]
public bool ShouldDisplayRelativePosition { get; set; }

Methods

Builds the field-specific parts of the code fragment, using the current CodeBuilder.

C#
protected override void BuildCodeOverride()

Overrides: CodeBasedField.BuildCodeOverride()

Copies all properties from another field of the same type.

C#
public override void CopyPropertiesFrom(Field fromField)
Parameters:fromFieldField

The other field, which has to be of the same type as the current instance.

Overrides: CodeBasedField.CopyPropertiesFrom(Field)

Copies the field-specific properties from a FieldCodeExpression.

C#
protected override void CopyPropertiesFromCodeExpression(FieldCodeExpression fieldCodeExpression)
Parameters:fieldCodeExpressionFieldCodeExpression

The field code expression.

Overrides: CodeBasedField.CopyPropertiesFromCodeExpression(FieldCodeExpression)

Creates the relative-position text for a bookmark and the current field.

C#
protected DocumentFragment GetRelativePositionString(DocumentPosition bookmarkPosition, DocumentPosition currentPosition)
Parameters:bookmarkPositionDocumentPosition

The position of the referenced bookmark.

currentPositionDocumentPosition

The position of this reference field.

Returns:

DocumentFragment

A fragment containing above when the bookmark precedes the field, or below otherwise.