View based intra text tagger needed

SyntaxEditor for WPF Forum

Posted 7 years ago by Xinen Lee
Version: 16.1.0635
Avatar

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?

Thanks

Xinen

Comments (1)

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

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 (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.