How can I set background for the LineNumberMargin ?

SyntaxEditor for WPF Forum

Posted 13 years ago by Peter Luo - AIMNEXT
Version: 11.1.0544
Avatar

Hi,

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 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.