如何跳转到RichTextBox中的特定行? [英] How do I jump to a specific line in a RichTextBox?

查看:48
本文介绍了如何跳转到RichTextBox中的特定行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个示例代码,该示例代码如何跳转到WPF中 RichTextBox 的特定行.

I'm looking for an example code how to jump to a specific line of a RichTextBox in WPF.

我不知道如何执行此操作,在winForms中它非常简单,因为我可以自由设置SelectionStart和SelectionLength,而在WPF中,等效属性是只读的.

I have no idea how to do this, in winForms it is very simple because I'm free to can set SelectionStart and SelectionLength that unlike in WPF the equivalent properties are read only.

推荐答案

API中有一些选项:

You have some options in the API:

这篇关于如何跳转到RichTextBox中的特定行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆