Saving and restoring Bookmarks

SyntaxEditor for WPF Forum

Posted 10 years ago by Martin - Blaise - Statistics Netherlands
Version: 13.1.0580

The goal is implementing bookmarks in an MDI environment. I want to store and reload the bookmarks for all the files of the Solution.

How can i retrieve the linenumbers of the bookmarks?


It looks like

var bmManager = MyEditor.Document.IndicatorManager.Bookmarks; 


gives only snapshot ids of the lines, not the lines/linenumbers themselves.



Comments (1)

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Martin,

You could do something like this to get position (line/char) data:

foreach (var indicator in editor.Document.IndicatorManager.Bookmarks.GetInstances()) {
	var position = indicator.VersionRange.Translate(editor.Document.CurrentSnapshot).StartPosition;
	// ...

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.