Current Line Highlighting

SyntaxEditor for WPF Forum

Posted 11 years ago by Rick - Developer, Visual Software Systems LLC
Version: 12.2.0571
Platform: .NET 4.0
Environment: Windows 8 (64-bit)
Avatar

I've noticed that when current line highlighting is turned on (IsCurrentLineHighlightingEnabled=True), SyntaxEditor doesn't immediately display the line highlight.  The only way I can get SyntaxEditor to highlight the current line is to page up or down or shift focus to another control and then back to SE.  Even the inline demo in the sample project exhibits this behavior.  When you click the checkbox to turn it on, the highlighting doesn't show up until the SyntaxEditor control gets the focus.  I would think that the highlighting should show immediately upon setting the property, regardless of whether or not the control has focus, just like the Windows Forms version of the control and just like many of the other properties that SE has (like ruler, line numbers, etc).  When you turn off current line highlighting, it does disappear immediately

 

Thanks... Rick

Comments (6)

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

Hi Rick,

That is actually by design in this case.  The current line highlight only shows when a view has focus.


Actipro Software Support

Posted 11 years ago by Rick - Developer, Visual Software Systems LLC
Avatar

OK.  That's surprising since none if the other SE UI features (e.g. line numbers, margin, ruler) behave that way.  They all update the view immediately, making the current line highlighting feature behave inconsistently with the rest of SE's features.  Can you change it so that Current Line Highlighting's behavior works like the rest of the feature set?

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

Hi Rick,

Well per above, we designed it so the highlight doesn't show if the control doesn't have focus.  Clicking the CheckBox moves focus to the CheckBox, thus the highlight won't show until you put focus back in the editor.  But now that we look at how VS 2012's current line highlight works (in the power extensions), they always show it regardless of focus.  I thought they used to only show it with focus like we do now, but perhaps they changed it for RTM.  We will write down to change it to always show the highlight if enabled, regardless of focus.


Actipro Software Support

Posted 11 years ago by Rick - Developer, Visual Software Systems LLC
Avatar

Perfect.  Thanks!

Posted 11 years ago by Kevin
Avatar

When can we expect an update to this? I would also like to have this feature change.

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

It's been implemented for the upcoming maintenance release.


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.