Class BookmarksNavigator
Helper class for navigations in document bookmarks and editing bookmarks content.
Inheritance
Inherited Members
Namespace: Syncfusion.DLS
Assembly: Syncfusion.DLS.Base.dll
Syntax
public class BookmarksNavigator
Constructors
BookmarksNavigator(IDocument)
Initializes a new instance of the BookmarksNavigator class.
Declaration
public BookmarksNavigator(IDocument doc)
Parameters
Type | Name | Description |
---|---|---|
IDocument | doc | The doc. |
Properties
CurrentBookmark
Gets the current bookmark.
Declaration
public Bookmark CurrentBookmark { get; }
Property Value
Type | Description |
---|---|
Bookmark | The current bookmark. |
Document
Gets / sets Document that this object is attached to.
Declaration
public IDocument Document { get; set; }
Property Value
Type | Description |
---|---|
IDocument | The document. |
Methods
DeleteBookmarkContent()
Deletes the content of the bookmark.
Declaration
public void DeleteBookmarkContent()
GetBookmarkContent()
Gets the content inside of the bookmark range.
Declaration
public TextRangesHolder GetBookmarkContent()
Returns
Type | Description |
---|---|
TextRangesHolder | The collection of text ranges |
InsertParagraphItem(ParagraphItemType)
Inserts the paragraph item to current position.
Declaration
public IParagraphItem InsertParagraphItem(ParagraphItemType itemType)
Parameters
Type | Name | Description |
---|---|---|
ParagraphItemType | itemType | Type of the item. |
Returns
Type |
---|
IParagraphItem |
InsertText(String)
Inserts the text range to current position.
Declaration
public ITextRange InsertText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
Returns
Type |
---|
ITextRange |
MoveToBookmark(String)
Moves the cursor to specified bookmark.
Declaration
public void MoveToBookmark(string bookmarkName)
Parameters
Type | Name | Description |
---|---|---|
System.String | bookmarkName | Name of the bookmark. |
MoveToBookmark(String, Boolean, Boolean)
Moves the cursor to specified bookmark.
Declaration
public void MoveToBookmark(string bookmarkName, bool isStart, bool isAfter)
Parameters
Type | Name | Description |
---|---|---|
System.String | bookmarkName | Name of the bookmark. |
System.Boolean | isStart | When true, moves the cursor to the beginning of the bookmark. When false, moves the cursor to the end of the bookmark |
System.Boolean | isAfter | When true, moves the cursor to be after the bookmark start or end position. When false, moves the cursor to be before the bookmark start or end position. |
ReplaceBookmarkContent(TextRangesHolder)
Replaces the content inside of the bookmark.
Declaration
public void ReplaceBookmarkContent(TextRangesHolder textRanges)
Parameters
Type | Name | Description |
---|---|---|
TextRangesHolder | textRanges | The collection of text ranges. |
Remarks
Works only iside one paragraph.