View based intra text tagger needed

SyntaxEditor for WPF Forum

Posted 3 years ago by Xinen Lee
Version: 16.1.0635

Hi Actipro,

I'm using the intra text spacer tagger, which is document based. I have 2 views sharing the same document, but I need the spaces to appear on 1 of the view, and not on the other.

Would Actipro be able to provide a spacer tagger based on view instead of document please?

Or, could you suggest how I could achieve the above?



Comments (1)

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

Hi Xinen,

If you look at our AdornmentsIntraTextNotes, that currently is doing document tagging.  To make it view-based tagging instead, you do these things...

1) Change the IntraTextNoteTagger to a view-based tagger with this contructor:

public IntraTextNoteTagger(IEditorView view) : base("IntraTextNoteTagger", null, (view != null ? view.SyntaxEditor.Document : null), true) {}

2) Change the language to register a view-based tagger provider instead:

this.RegisterService(new TextViewTaggerProvider<IntraTextNoteTagger>(typeof(IntraTextNoteTagger)));

3) Change the MainControl.OnAddNoteButtonClick handler's 'if' statement to be:

if (editor.ActiveView.Properties.TryGetValue(typeof(IntraTextNoteTagger), out tagger)) {

If you do those things, it will be view-based.

Actipro Software Support

The latest build of this product (v2019.1 build 0684) was released 17 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.