tags:

views:

16

answers:

1

hi I have RichTextBox bind to description(html format) from database and it is read only. I just need to show First line from description. How to achieve this

A: 

As Silverlight has no way of measuring the width of fonts, you'll need to take an arbitrary amount of the text, and simply Substring() it.

Chris S
using substring I am showing 100 characters of the text in first line. but if I increase Font size of the text, it wraps to next line. I just need to show first line irrespective of font size.
jolly
@Jolly you could turn off text wrapping in the textbox
Chris S