Use a custom font set like this:
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontFamily = new Telerik.WinControls.SyntaxEditor.UI.FontFamily("Cascadia Code");
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontSize = 13;
Then load a large document, at least 10K lines so that the clipping is visible.
Hello,
The issue can be worked around by manually syncing the font of the measurement text block with that of the editor:
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontFamily = new Telerik.WinControls.SyntaxEditor.UI.FontFamily("Cascadia Code");
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontSize = 13;
var lineNumberMargin = this.radSyntaxEditor1.SyntaxEditorElement.Margins.ScrollableLeft[0];
var textBlock = typeof(LineNumberMargin).
GetField("measureBlock", BindingFlags.Instance | BindingFlags.NonPublic).
GetValue(lineNumberMargin) as TextBlock;
if (textBlock != null)
{
textBlock.FontFamily = this.radSyntaxEditor1.SyntaxEditorElement.EditorFontFamily;
textBlock.FontSize = this.radSyntaxEditor1.SyntaxEditorElement.EditorFontSize;
}
Here is the result:
Regards,
Hristo
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.