Priorities of tagger and highlighting styles

SyntaxEditor for WPF Forum

The latest build of this product (v22.1.4) was released 2 months ago, which was before this thread was created.
Posted 1 month ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 22.1.1
Avatar

Hi,

we have a custom tagger that highlights all occurences of the currently selected word. But when the current line highlighting is activated and the style has a background color, the style for the selected word is overwritten. So the background color for the current line has a higher priority than all the other taggers.

I thought you can change the priorities with the 'Ordering' parameter in the constructor, but I cannot find a key which has a higher priority than the current line. How can I change the priority for my tagger to draw over the current line highlighting?


Best regards, Tobias Lingemann.

Comments (2)

Answer - Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

That's a tough scenario since the current line highlight is in the Highlight adornment layer, while text backgrounds from classification taggers are in the Text Background (lowest) adornment layer.  It needs to be in that order or the border from the current line highlight wouldn't render over any text backgrounds and would be totally hidden. 

But then of course if you set a fully-opaque background to the current line highlight, which is normally transparent, we have the opposite issue.  Since the z-order of these can't change, our recommendation is to make sure that any background color set to the current line highlight has a very high level of alpha transparency, which will allow the background contents to show through, while still giving the current line highlight additional visibility.


Actipro Software Support

Posted 1 month ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Okay, fine enough for me. The issue is just that this was working with the older WinForms release and after the update to the current WPF release it's not. So I just wanted to ask, if I'm doing anything wrong. I'll just tell the product manager that the same behavior is no longer possible and we need to change the style for the current line.


Best regards, Tobias Lingemann.

Add Comment

Please log in to a validated account to post comments.