Reputation: 41
I have spent an entire day to implementent functionality like GetRectFromCharacterIndex() with no success. Microsoft has not implemented it for Silveright 4.
I need to fetch the co-ordinates (Start & End) of word of a multiline text box in Silverlight 4. It should be noted that the textbox is wrappable. I am not able to find it since a new line and a wrapped lines are two different thing. I am unable to to find the end of line for a wrapped line.
Is it possible to fetch the exact co-ordinates (It is not index of char in string/textbox) of word in a multiline textbox?
Thanks in Advance.
Regards
Sudhir Kumar
Upvotes: 3
Views: 59
Reputation: 14811
Turns out GetRectFromCharacterIndex
wasn't implemented in SL5 either.
The only way you can do this is to implement it manually. To see example how it can be done, you can look at this answer. Be careful, though, since calculating such thing yourself is usually a performance killer.
Upvotes: 1