Editing outlining vertical line color

SyntaxEditor for WPF Forum

Posted 3 years ago by Daisuke Nakada
Version: 17.2.0662
Avatar

Hi, 

An outlining vertical line are is highlighted when hovering the mouse.

Please tell me how to change this highlighting color.

Thank you

Comments (13)

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

Hello,

I believe you are referring to the highlight effect that occurs when you mouse over an expanded outlining node's line in the outlining margin?  If so, the highlighting style registered with DisplayItemClassificationTypes.CollapsibleRegion in the AmbientHighlightingStyleRegistry will control that.  The style's Foreground is the background in the margin, and the Background is the background in the text area for that effect.  You can register a custom highlighting style there to change colors.


Actipro Software Support

Posted 3 years ago by Daisuke Nakada
Avatar

Yes, it is the color I want to edit.

Thank you!

Posted 3 months ago by JP Garza
Avatar

Hello,

What about the hovering color of the collapsable content? Is there any AmbientHighlightingStyleRegistry classification type for it?

Thanks,

JP

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

Hello,

Do you mean within the outlining margin or the "..." adornment itself in the text area?


Actipro Software Support

Posted 3 months ago by JP Garza
Avatar

Not sure what the area is called specifically. But when I hover on the collapsible margin line I get highlighting on top of all my collapsible content. I want to change the conteng highlighting color.

Image here (want to change white highlight to a darker color)
https://i.imgur.com/lW5bZ6F.png

[Modified 3 months ago]

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

Basically the ones you want to change are:

  • CollapsedText - Collapsed text adornment ("...")
  • CollapsibleRegion - The effect that renders the region in the text area when you mouse over a node in the margin
  • OutliningMarginSquare - Box in outlining margin
  • OutliningMarginVerticalRule - Lines in outlining margin


Actipro Software Support

Posted 3 months ago by JP Garza
Avatar

All those values allowed me to change some parts of it. But I still was not able to change this one (pointing to it with red arrow on image):
https://i.imgur.com/LlSCnI0.png

[Modified 3 months ago]

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

CollapsibleRegion is the one you want to change for the screenshot.  When I changed the foreground/background in the Highlighting Style Viewer sample, I see that getting updated.


Actipro Software Support

Posted 3 months ago by JP Garza
Avatar

Okay, when I set that I only see the green area change:
https://i.imgur.com/OedatHW.png

I must have something else overriding the value I guess. Any clue? Maybe a system value?

[Modified 3 months ago]

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

It should work fine as long as you are updating the registry value properly.  Maybe get the highlighting style from AmbientHighlightingStyleRegistry.Instance[new DisplayItemClassificationTypes.CollapsibleRegion] after you think you updated it properly and see if the Background matches what you changed it to.  The Background is what is used for the text area portion.

[Modified 3 months ago]


Actipro Software Support

Posted 3 months ago by JP Garza
Avatar

Wow, I figured it out with your help, but it is a bit confusing. So it turns out each of these lines (1 & 2) colors a different part of the hover content.

https://i.imgur.com/gmu3KTP.png

line 1 --> colors the left vertical line background
line 2 --> colors the content/text background 

https://i.imgur.com/BG9nM6P.png

[Modified 3 months ago]

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

The Foreground is used for the margin and the Background is used for the text area.  You could have a single line if you set both Foreground and Background in the constructor of your HighlightingStyle.


Actipro Software Support

Posted 3 months ago by JP Garza
Avatar

Agh! I see. Thank you very much for your time and support!

The latest build of this product (v2020.1.1) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.