Customizing CurrentLine Highlighting Style

SyntaxEditor for WPF Forum

Posted 12 years ago by Rick - Developer, Visual Software Systems LLC
Version: 11.2.0553
Avatar

I'm trying to reproduce the current line highlighting style that SE for WinForms uses.  The SE for WPF documentation states that only the foreground property of the default CurrentLine highlighting style is update-able, so I thought I could define a custom highlighting style and override the default style, but I can't seem to get a background color to apply.  Here's the code that I'm using:

Dim SpecialTypes As New DisplayItemClassificationTypeProvider(AmbientHighlightingStyleRegistry.Instance)
SpecialTypes.RegisterAll()

AmbientHighlightingStyleRegistry.Instance.Register(SpecialTypes.CurrentLine, New Highlighting.Implementation.HighlightingStyle(Brushes.Red, Brushes.Red), True)

 The foreground color gets applied, but the background doesn't.  I'm sure I'm missing something, but am at a loss as to what.

 

Thanks... Rick

Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Rick,

Our current line highlight in this version was designed to mimic what Visual Studio 11 does with its current line highlight.  At the moment, the Background is used to render the two pixel border around the current line.  Other options on the style aren't intended to be used.

We will log your request to add other configuration options for the future.


Actipro Software Support

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Rick,

The 2012.1 version will allow you to configure a border and/or background for the current line highlight feature.


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.