IntelliPrompt highlighted matched text color

SyntaxEditor for WPF Forum

Posted 5 years ago by tal
Version: 14.2.0611
Avatar

Hey,
I’m experimenting with the Dark Metro Theme and SyntaxEditor feature examples and I realized that the effect of highlighting matched text in the IntelliPrompt isn’t noticeable (Completion Match Options example under the IntelliPrompt QuickStarts).
Is there a way that I could programmatically change that color to be the same as in the light version of that theme (blue color) or any other color for that matter?
Thanks,
Tal

Comments (4)

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

Hello,

The determination of that color is a bit complex due to different themes having different colors and needing them to work well together.  I believe that in general it will use the Brush defined by AssetResourceKeys.HyperlinkForegroundNormalBrushKey.  You can see our Themes examples on how to override Brush resources.  Then if that color is near the AssetResourceKeys.ListItemBackgroundSelectedFocusedBrushKey color, which I think is the case in Metro Dark, it will create and use a semi-transparent of the normal text color brush instead.  Since otherwise, the highlight wouldn't show up with the selected list item background.  I'd recommend playing around with different HyperlinkForegroundNormalBrushKey values.


Actipro Software Support

Posted 5 years ago by tal
Avatar

Hey,
Thanks, it did actually made a color change for the letters but only on the selected (focused) item in the auto-complete list. Is it possible to extend that to all the items shown? (just like in the MetroLight version)
Thanks again,
Tal

Posted 5 years ago by tal
Avatar

Never mind, used LinearGradientBrush and it worked perfectly.

<LinearGradientBrush x:Key="{x:Static themes:AssetResourceKeys.HyperlinkForegroundNormalBrushKey}">
    <GradientStop Color="Blue"></GradientStop>
</LinearGradientBrush>

 Thank you for all your help!

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

Yes, we only modify the brush if a SolidColorBrush is used so that's a good workaround to use LinearGradientBrush.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.