PlainText classification:

SyntaxEditor for WPF Forum

Posted 10 years ago by Matt Kerchmar
Avatar
Hello,

Changes to the HighlightingStyle associated with the PlainText classification do not seem to effect anything that I can see. I thought this is the default base style which all other styles deviate from. Is this incorrect?

I'm trying to change the font for the entire document, so I thought that changing the font settings in the PlainText style would accomplish that.

Thanks,
Matt Kerchmar

[Modified at 03/02/2010 02:15 PM]

Comments (7)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Matt,

I think it may just be using the AmbientHighlightingStyleRegistry for that right now. It would seem that we need to add some property that would let you specify an alternate "default" highlighting style registry. Then we could use that as our one for plain text, and also could attach to its events as opposed to the ambient one, thereby fixing your other issue and you wouldn't need to do the classification tag trick either.

What do you think?


Actipro Software Support

Posted 10 years ago by Matt Kerchmar
Avatar
Hello,

If I am understanding what you are saying, the PlainText style only functions with the AmbientHighlightingStyleRegistry, so it doesn't really work when I try to use it in another registry?

I'm not sure that being able to specify an alternate default registry would completely solve the issue. My application has any number of script windows that are syntax highlighted. These can share the same fonts and colors. But I have a second type of window, an output window. This output window is a lot like the one in visual studio. However, one major difference is that everything that is output from it is also executable code. Because of this, I want to have the output window also support syntax highlighting. But I do not want to force the user to share the same fonts and colors as the script windows. This is why I need multiple highlighting registries, so that I can have unique sets of fonts and colors.

Would it be a possible solution to change the behavior of PlainText so that it can be overridden in an alternate registry?

Thanks,
Matt Kerchmar
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Matt,

Well right now there is now way to tell a SyntaxEditor to use a particular default highlighting style registry. Thus for things like PlainText and the margin styles, it hits the ambient registry.

Thus what I was suggesting was that we add a property where you tell each SyntaxEditor instance which default registry to use. Most people will leave it null, meaning use the ambient one like today. But in your case, you'd set all your script SyntaxEditors to use the script-oriented registry and the output SyntaxEditors to use the output-oriented registry.

Then each SyntaxEditor would use its own appropriate PlainText, etc. Make more sense?


Actipro Software Support

Posted 10 years ago by Matt Kerchmar
Avatar
Hello,

Yes, this sounds like it would fully solve the issue. Thank you for your explanation, it makes perfect sense.

-Matt Kerchmar
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
This has been implemented for the 2010.1 release. It's pretty nice and we've updated the Highlighting Styles Viewer QuickStart to show how you can switch between configuring multiple registries and how the changes apply to editors that use each registry.


Actipro Software Support

Posted 10 years ago by Matt Kerchmar
Avatar
Hello,

This sounds great. When is 2010.1 expected to hit the virtual shelves?

Thanks,
Matt Kerchmar
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
May be a few weeks yet.


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.