Skip to content
Discussion options

You must be logged in to vote

What is the use-case? (Note that AvaloniaEdit is a source code editor, not a rich text editor.)

The AvaloniaEdit.Demo contains an example UnderlineAndStrikeThroughTransformer, which applies underline and strikethrough format. See

class UnderlineAndStrikeThroughTransformer : DocumentColorizingTransformer

Example: Let's say you want to make all source code comments in the text italic.

To achieve this, you can:

  • Implement your own MyCommentTransformer derived from DocumentColorizingTransformer.
  • Override the method ColorizeLine. Check if the text line contains a comment (like "// ...") and then call Ch…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FabianGolembiewski-sp
Comment options

Answer selected by FabianGolembiewski-sp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants