Padding between Margins and Text

SyntaxEditor for WPF Forum

The latest build of this product (v2019.1 build 0685) was released 4 months ago, which was before this thread was created.
Posted 10 days ago by Andrew Howson
Version: 19.1.0685


In my Syntax Editor, I don't have any padding between the Line Number Margin and the beginning of the text on each line. In the image below (from the ActiPro Syntax Editor web page), this is the space between the yellow margin and the text.

When I initally created the control, this worked:

    <Style TargetType="{x:Type syntaxEditor:EditorLineNumberMargin}">
        <Setter Property="MinWidth" Value="21" />
        <Setter Property="Margin" Value="0,0,6,0" />

where the added margin would create the space. It seems now when I increase margin like this the line numbers fill the space, applying the same background color as the LineNumberMargin (a different color to the text editor).

Quite new to this, so apologies if I've missed something obvious, but what is the usual way to enable this spacing?



Comments (3)

Posted 9 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Andrew,

There should be spacing between the number and yellow modification mark by default.  When I look in our samples, I see spacing between them.

But back to your question, if you set Padding to "0,0,6,0" instead of Margin, that should set the right spacing to 6px.

Actipro Software Support

Posted 9 days ago by Andrew Howson

Thank you for the info.

If the spacing is there by default then somewhere we must have code that is unintentionally removing this margin. I can go ahead and investigate this, thanks for clarifying that I wasn't just missing something about the control.

Neither Padding or Margin solves the issue, but the issue must be in our codebase somewhere.

[Modified 9 days ago]

Posted 9 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Andrew,

Double check to see if you see it in our samples first.  Then if so, you know that something in your app's code is probably triggering it.

Actipro Software Support

Add Comment

Please log in to a validated account to post comments.