views:

165

answers:

2

The TextBlock control has LineHeight. Does anyone know a good way to set LineHeight in the RichTextBox Control in Silverlight 4?

A: 

Not sure if this'll help but worth a try: http://stackoverflow.com/questions/325075/how-do-i-change-richtextbox-paragraph-spacing

James Alexander
Sadly, it doesn't help. The Paragraph class doesn't actually have a LineHeight property as that example is in WPF not Silverlight.
Brendan Enrick
A: 

Hack: This seems to cause all the lines (even when wrapped) to be the height that FontSize 26 would cause.

Run run = new Run();

run.FontSize = 26;

run.Text = "";

Par.Inlines.Add(run);

run = new Run();

run.Text = "long text here...";

run.FontSize = 12;

Par.Inlines.Add(run);

Bill