ReferenceFieldBase
Provides bookmark selection and display options shared by content and page cross-reference fields.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public abstract class ReferenceFieldBase : CodeBasedField, ISupportInitialize
Inheritance: objectFieldCodeBasedFieldReferenceFieldBase
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes the bookmark property used by derived reference fields.
public ReferenceFieldBase()
Fields
Identifies the field property that stores the referenced bookmark name.
public static readonly FieldPropertyDefinition BookmarkNameProperty
Text returned when the referenced bookmark is missing or cannot be resolved.
protected static readonly string ReferenceSourceNotFoundError
Properties
Gets or sets the bookmark whose content or location this field references.
[XamlSerializable]
public string BookmarkName { get; set; }
Gets or sets whether the reference result is wrapped in a hyperlink to the referenced bookmark.
[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.
[XamlSerializable(false)]
public bool ShouldDisplayRelativePosition { get; set; }
Methods
Builds the field-specific parts of the code fragment, using the current CodeBuilder.
protected override void BuildCodeOverride()
Overrides:
Copies all properties from another field of the same type.
public override void CopyPropertiesFrom(Field fromField)
The other field, which has to be of the same type as the current instance.
Overrides:
Copies the field-specific properties from a FieldCodeExpression.
protected override void CopyPropertiesFromCodeExpression(FieldCodeExpression fieldCodeExpression)
The field code expression.
Overrides:
Creates the relative-position text for a bookmark and the current field.
protected DocumentFragment GetRelativePositionString(DocumentPosition bookmarkPosition, DocumentPosition currentPosition)
The position of the referenced bookmark.
currentPositionDocumentPositionThe position of this reference field.
Returns:A fragment containing above when the bookmark precedes the field, or below otherwise.