Reputation: 2812
So basically what I need to do in a C sharp rich text box, is take the text from how it looks in this image:
And make it look perfectly formatted like stack overflow does:
I have tried playing with the rtb.sethangingIndent method, but that just sets it for the ENTIRE textbox at the same time
As I am sure you can see, There are different levels that the text needs to be indented by, depending on which level you are at, which I think confuses things a lot!
Is there a way to do this without looping through each line of the textbox, and counting the amount of whitespace before the top line of "block" (that would need to be indented)?
Upvotes: 3
Views: 1349
Reputation: 401
If you manually write this, try to use different paragraphs. 1. Product Data: 1. Submit manufacturers printed product literature, specifications and datasheet in accordance with specifications
If you want to adjust it by code. Try TextPointer. - http://msdn.microsoft.com/en-us/library/system.windows.documents.textpointer.aspx
Upvotes: 1