Padding between Margins and Text

SyntaxEditor for WPF Forum

Posted 3 months ago by Andrew Howson
Version: 19.1.0685
Avatar

Hi,

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.Resources>
    <Style TargetType="{x:Type syntaxEditor:EditorLineNumberMargin}">
        <Setter Property="MinWidth" Value="21" />
        <Setter Property="Margin" Value="0,0,6,0" />
    </Style>
</Style.Resources>

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?

Thanks,

Andrew

Comments (3)

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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 3 months ago by Andrew Howson
Avatar

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 3 months ago]

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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

The latest build of this product (v2019.1 build 0686) 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.