Get a hover line from a wrapped Silverlight TextBox

when we hover over a wrapped text field, I want to immediately get the word or text under the mouse.

I saw several examples for one text field, like this one , but I have a wrapped text field. I think I could do this if I had a MeasureString function, but I don't have it in Silverlight (it would be useful for other things).

TextBox Example

 <Textbox TextWrapping="Wrap" Width="50" Text=" ... " />
+3
source share
1 answer

Silverlight does not have this feature today. Here is what I would do as a workaround:

  • ( 0, IsHitTestVisible = False) WrapPanel TextBlock .
  • WrapPanel , TextBlock
  • TextBlocks WrapPanels, .
  • WrapPanel TextBlocks,
0

Source: https://habr.com/ru/post/1717499/


All Articles