您好,
用TextBlock获取每一行文本是没有现成的方法可以直接调用的,你可能需要根据字体大小,每行高度等等去计算每行可以包含多少的文本,通过这种方式去实现。
我建议你可以使用RichEditBox ,根据TextRangeUnit.Line去获取每一行。
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.