BookmarkEnd Class
Represents the end position of the Bookmark in the document.
Inheritance
Inherited Members
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public class BookmarkEnd : ParagraphItem, IXDLSSerializable, IParagraphItem, IEntity, IOfficeRun, ILeafWidget, IWidget
Constructors
BookmarkEnd(IWordDocument, String)
Initializes a new instance of the BookmarkEnd class with the specified WordDocument and Bookmark name.
Declaration
public BookmarkEnd(IWordDocument document, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| IWordDocument | document | The WordDocument object. |
| System.String | name | The string that represents the Bookmark name. |
Properties
EntityType
Gets the type of the entity.
Declaration
public override EntityType EntityType { get; }
Property Value
| Type | Description |
|---|---|
| EntityType | The EntityType of the current item. |
Overrides
IsAfterCellMark
Gets or sets a value indicating whether the bookmark end is positioned after the table cell mark.
Declaration
public bool IsAfterCellMark { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if the bookmark end is serialized after the closing table-cell tag; otherwise, false. |
Examples
WordDocument document = new WordDocument();
IWTable table = document.AddSection().AddTable();
table.ResetCells(1, 1);
IWParagraph paragraph = table[0, 0].AddParagraph();
paragraph.AppendBookmarkStart("Bookmark1");
paragraph.AppendText("Hello");
BookmarkEnd bookmarkEnd = paragraph.AppendBookmarkEnd("Bookmark1");
bookmarkEnd.IsAfterCellMark = true;
document.Save("Output.docx", FormatType.Docx);
document.Close();
IsAfterParagraphMark
Gets or sets a value indicating whether the bookmark end is positioned after the paragraph mark.
Declaration
public bool IsAfterParagraphMark { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if the bookmark end is serialized after the closing paragraph tag; otherwise, false. |
Examples
WordDocument document = new WordDocument();
IWParagraph paragraph = document.AddSection().AddParagraph();
paragraph.AppendBookmarkStart("Bookmark1");
paragraph.AppendText("Hello");
BookmarkEnd bookmarkEnd = paragraph.AppendBookmarkEnd("Bookmark1");
bookmarkEnd.IsAfterParagraphMark = true;
document.Save("Output.docx", FormatType.Docx);
document.Close();
IsAfterRowMark
Gets or sets a value indicating whether the bookmark end is positioned after the table row mark.
Declaration
public bool IsAfterRowMark { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if the bookmark end is serialized after the closing table-row tag; otherwise, false. |
Examples
WordDocument document = new WordDocument();
IWTable table = document.AddSection().AddTable();
table.ResetCells(1, 1);
IWParagraph paragraph = table[0, 0].AddParagraph();
paragraph.AppendBookmarkStart("Bookmark1");
paragraph.AppendText("Hello");
BookmarkEnd bookmarkEnd = paragraph.AppendBookmarkEnd("Bookmark1");
bookmarkEnd.IsAfterRowMark = true;
document.Save("Output.docx", FormatType.Docx);
document.Close();
IsAfterTableMark
Gets or sets a value indicating whether the bookmark end is positioned after the table mark.
Declaration
public bool IsAfterTableMark { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true if the bookmark end is serialized after the closing table tag; otherwise, false. |
Examples
WordDocument document = new WordDocument();
IWTable table = document.AddSection().AddTable();
table.ResetCells(1, 1);
IWParagraph paragraph = table[0, 0].AddParagraph();
paragraph.AppendBookmarkStart("Bookmark1");
paragraph.AppendText("Hello");
BookmarkEnd bookmarkEnd = paragraph.AppendBookmarkEnd("Bookmark1");
bookmarkEnd.IsAfterTableMark = true;
document.Save("Output.docx", FormatType.Docx);
document.Close();
Name
Gets the bookmark name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the bookmark end name in the document. |
Methods
CloneImpl()
Creates a duplicate copy of the entity.
Declaration
protected override object CloneImpl()
Returns
| Type | Description |
|---|---|
| System.Object | An object that is newly created. |
Overrides
CreateLayoutInfo()
Creates layout information.
Declaration
protected override void CreateLayoutInfo()