EditorLineNumberMargin

SyntaxEditor for WPF Forum

Posted 10 years ago by Jon von Gillern
Version: 9.2.0514
Avatar
The size of the syntax editor in my window is pretty small as my users are only editing 10-ish lines of code. But I'd still like them to be able to see the line numbers, but there is a significant amount of whitespace to the left of the line numbers and between the line numbers in the code. I want to eliminate how much space the LineNumberMargin is taking up. Based on searching on the forum I tried adding the following XAML to my app.xaml but it doesn't work.

<Style TargetType="{x:Type editor:EditorLineNumberMargin}">
<Setter Property="MaxWidth" Value="15" />
</Style>

How can I reduce the overall width of the LineNumberMargin?

Comments (2)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jon,

I would suggest you do this instead:
<Style TargetType="{x:Type editor:EditorLineNumberMargin}"> 
    <Setter Property="MinWidth" Value="10" /> 
</Style>
I just tested it and it worked well.


Actipro Software Support

Posted 10 years ago by Jon von Gillern
Avatar
Works perfect, as soon as I set the other available margins (outline, selection, ruler) to not be visible, it removed the extra whitespace between the line margin and the code.

Thanks Much!
The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.