How can I set background for the LineNumberMargin ?

SyntaxEditor for WPF Forum

Posted 11 years ago by Peter Luo - AIMNEXT
Version: 11.1.0544


How can I set background for the LineNumberMargin when the document is read-only?

By the way, how to display a vertical dot line on the right side of LineNumberMargin?

Thanks a lot!

Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Peter,

You'd need to retemplate the EditorLineNumberMargin class in your application or SyntaxEditor XAML Resources, as our default one has a trigger that updates the background when read-only. You can create an implicit Style for that type that at a minimum has this:
<shared:CustomDrawElement x:Name="PART_Presenter" Margin="2,0,2,0" />
Then surround it with a Border that has your desired background and border brush, etc.

Actipro Software Support

The latest build of this product (v22.1.3) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.