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
2010-04-19 20:02:34
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
2010-04-19 20:54:10
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
2010-04-29 06:57:49