Open rampaa opened 2 years ago
That should not be too complicated to add. The hard work is already done by the underlying TextLayout.
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Base/Media/TextFormatting/TextLayout.cs#L283 for example
TextLayout is exposed to the TextBox via the _textPresenter
Contributions are welcome 🙏
Is your feature request related to a problem? Please describe. I want to get the index of the character from the TextBox that is closest to cursor position but I'm not sure if there's a straightforward way of achieving this.
Describe the solution you'd like WPF TextBox has a method called GetCharacterIndexFromPoint, a method equivalent to that would let me achieve my goal.