I did find in the formus similar problems, but i didnt find the solution i needed.
If I do this, to make line spacing look like in a microsoft notepad, i get problems with changing font size after that.
private void xamlDP_SetupDocument(object sender, Telerik.Windows.Documents.FormatProviders.SetupDocumentEventArgs e)
{
e.Document.LineSpacing = 0.3;
}
Selection looks like on "screenshot.png".
How can I fix that?
4 Answers, 1 is accepted
Are there other settings to make line spacing in all cases the same (0.3) ?
Please provide me some information about this... I have a feeling that my posts are often ignored by your support...
We try to monitor the forums, but an answer is by no means guaranteed. If you or your company has purchased a license for RadControls for Silverlight, you can refer to our FAQ section for information on how to get assigned as a license holder and use the support ticketing system.
As for your question, the line spacing is a parameter that specifies the spacing between lines in the same paragraph. Setting LineSpacing = 1 and LineSpacingType = Multiple (the default value) specifies that the line will be as high as 1 * the maximum word height in the line. That is why if you set it to a value less than 1, this will cause text to overlap and the selection will not show correctly.
If you want to set an exact value, say 15 pt, to be the line spacing, you could do so as follows:
e.Document.LineSpacingType = LineSpacingType.Exact;
e.Document.LineSpacing = Unit.PointToDip(15);
Again, if the height of the line is larger than 15 pt, the text will overlap.
Perhaps the property you are looking for is ParagraphDefaultSpacingAfter, which has a default value of 9pt and is the space between adjacent paragraphs? This one can be set to 0 and will simply cause no spacing between paragraphs.
All the best,
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I will contact my "license holder" :)