How to get coordinates of certain character within TextBox and/or RichTextBox?
I will try to explain this through function:
Point GetXY(int characterIndex) {
//do some magic
return new Point(x, y);
}
Idea is to find where selected text is located so Find dialog will not be displayed over this location but moved to side (like Word is doing).
The RichTextBox control enables you to display or edit flow content including paragraphs, images, tables, and more. This topic introduces the TextBox class and provides examples of how to use it in both Extensible Application Markup Language (XAML) and C#.
Answers. Hi, you can check RichTextBox. TextLength, if it is 0, means RichTextBox is empty of text and images.
GetPostitionFromCharIndex might be what you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With