Adornment IsMouseOver trigger if adornment is behind text selection

SyntaxEditor for WPF Forum

Posted 12 years ago by Thomas
Version: 12.1.0561
Avatar
  • I am using CollectionTagger<T> and DecorationAdornmentManagerBase<TView, TTag> to create adornments (colored rectangles) around some text ranges.
  • A style trigger changes the color of the adornment rectangles while IsMouseOver is true (-> hover effect).
  • The adornment layer for these rectangles should be positioned after the selection layer, so that the text selection will be rendered in front of the rectangles.

Works great, but now the Problem:

My hover effect stops working for selected text. It seems, that the selection "catches" the mouse over events.

Any workaround for this problem?

Thanks,

Tom

Comments (1)

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

Hi Tom,

I looked into it and sorry but unfortunately there's no workaround unless you move your elements on top of the selection.  We can't turn mouse hit-testing off on the selection element because we use it to change the cursor to an arrow instead of I-Beam.  And since your element is behind it, the selection element will eat the mouse message.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.