Priorities of tagger and highlighting styles

SyntaxEditor for WPF Forum

Posted 1 year 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 year 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 year 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.

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

Add Comment

Please log in to a validated account to post comments.