WPF RichTextBox - Parent element from caret position.

Posted by Lunetics on Stack Overflow See other posts from Stack Overflow or by Lunetics
Published on 2010-06-16T23:46:34Z Indexed on 2010/06/16 23:52 UTC
Read the original article Hit count: 206

Filed under:
|
|

Consider this document structure:

<FlowDocument><Paragraph>loreM Ipsum</Paragraph></FlowDocument>

And my caret position is between 'M' and 'I' in the RichTextBox. How can I get the parent element from caret position? In this case the parent would be the Paragraph.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET