[]
Represents PAGEREF field options.
A PAGEREF field inserts the number of the page containing the bookmark for a cross-reference.
public class PageRefFieldOptions : FieldFormatOptions, IFieldOptions
Initializes a new instance of the PageRefFieldOptions class.
public PageRefFieldOptions(ComplexField field)
field ComplexFieldThe ComplexField from which to load the options.
Initializes a new instance of the PageRefFieldOptions class.
public PageRefFieldOptions(DocumentBase doc, string bookmark)
doc DocumentBaseThe document whose resources to use in this instance.
bookmark stringThe bookmark name for a cross-reference.
Initializes a new instance of the PageRefFieldOptions class.
public PageRefFieldOptions(SimpleField field)
field SimpleFieldThe SimpleField from which to load the options.
Gets or sets the bookmark name for a cross-reference.
public string Bookmark { get; set; }
Thrown when trying to set null or empty string.
Gets or sets a value indicating whether to display the position relative to the source bookmark.
Default value is false.
If the PAGEREF field is on the same page as the bookmark, it omits "on page #" and returns "above" or "below" only.
If the PAGEREF field is not on the same page as the bookmark, the string "on page #" is used.
public bool DisplayRelative { get; set; }
Gets or sets a value indicating whether to create a hyperlink to the bookmarked paragraph.
The default value is false.
public bool Hyperlink { get; set; }
Saves options to a ComplexField.
public override void Save(ComplexField field)
field ComplexFieldThe ComplexField where to save the options.
Saves options to a SimpleField.
public override void Save(SimpleField field)
field SimpleFieldThe SimpleField where to save the options.