Highlighting style not applied correctly

SyntaxEditor for WPF Forum

The latest build of this product (v22.1.4) was released 25 days ago, which was before this thread was created.
Posted 15 days ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 22.1.3
Platform: .NET 4.8
Environment: Windows 10 (64-bit)
Avatar

Hi,

we use a default style that sets a background and foreground color for most scenarios. If another style only modifies the foreground color, the background color remains null. According to your documentation the background color from the default style should be applied then.

However this only works if the token is surrounded by whitespaces. This specifically doesn't work for the first token in any given line, unless it is a whitespace.

As a workaround we use the background from our default style as fallback instead of null. But it would be easier if we just could use null instead.


Best regards, Tobias Lingemann.

Comments (2)

Posted 15 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

I tried to recreate what you are describing, but could not. Highlighting styles and the various scenarios in which they are applied can be complex, so I'm likely not replicating precisely what you're doing.

Would you be able to create a simple sample project that demonstrates how you define the default style and how you are applying the style that doesn't render correctly with a null background? If so, please attach to an email to our support email address and reference this forum post in the email. Please remove any bin/obj folders before zipping or the attachment will be blocked.  Alternatively, steps to reproduce it using one of our samples works just as well.


Actipro Software Support

Answer - Posted 15 days ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Okay, I see what I did wrong here. We forgot to register the default style to DisplayItemClassificationTypeProvider.PlainText. After we did that, everything works as expected.


Best regards, Tobias Lingemann.

Add Comment

Please log in to a validated account to post comments.