Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hello,

I'm using richtextbox (WPF)in which it displays text with underline, large font etc.

The problem is I'm not able to read text attribute of each character or text.

on textchange event I'm reading whole data displayed in richtectbox and saving it.

How to achieve this?

Please help.

Thanks.
Posted
Updated 3-May-14 1:22am
v2

1 solution

First of all, you did not specify the method you're using to save text from RichTextBox to a file and vice-versa.

Have a look here: RichTextBox.Rtf Property [^]. It enables to get or set the text of the RichTextBox control, including all rich text format (RTF) codes.

WD: Rich Text Format (RTF) Specification Version 1.7 Available[^]
How to: Convert RTF to Plain Text (C# Programming Guide)[^] - many useful information
 
Share this answer
 
v3
Comments
KIDYA 5-May-14 7:36am    
Thanks for your reply.
I'm using System.Windows.Control.RichtextBox control.
And I'm saving displayed data into the buffer.
On basis underline I have to add specific byte to the array.
Is it possible to read richtectbox displayed text character by character and their attributes.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900