[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Fields.PageRefFieldOptions

Class PageRefFieldOptions

Namespace
GrapeCity.Documents.Word.Fields
Assembly
GcDocs.Word.dll

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
Inheritance
PageRefFieldOptions
Implements
Inherited Members

Constructors

PageRefFieldOptions(ComplexField)

Initializes a new instance of the PageRefFieldOptions class.

public PageRefFieldOptions(ComplexField field)

Parameters

field ComplexField

The ComplexField from which to load the options.

PageRefFieldOptions(DocumentBase, string)

Initializes a new instance of the PageRefFieldOptions class.

public PageRefFieldOptions(DocumentBase doc, string bookmark)

Parameters

doc DocumentBase

The document whose resources to use in this instance.

bookmark string

The bookmark name for a cross-reference.

PageRefFieldOptions(SimpleField)

Initializes a new instance of the PageRefFieldOptions class.

public PageRefFieldOptions(SimpleField field)

Parameters

field SimpleField

The SimpleField from which to load the options.

Properties

Bookmark

Gets or sets the bookmark name for a cross-reference.

public string Bookmark { get; set; }

Property Value

string

Exceptions

PropertyNullOrWhiteSpaceException

Thrown when trying to set null or empty string.

DisplayRelative

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; }

Property Value

bool

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; }

Property Value

bool

Methods

Save(ComplexField)

Saves options to a ComplexField.

public override void Save(ComplexField field)

Parameters

field ComplexField

The ComplexField where to save the options.

Exceptions

PropertyNullOrWhiteSpaceException

Thrown when the Bookmark property is null or empty string.

Save(SimpleField)

Saves options to a SimpleField.

public override void Save(SimpleField field)

Parameters

field SimpleField

The SimpleField where to save the options.

Exceptions

PropertyNullOrWhiteSpaceException

Thrown when the Bookmark property is null or empty string.