Question

I'm using AvalonEdit in a Microsoft Surface application. It's working great, but I have one problem with folding. There are this small + icons to enable folding. But I don't know how I can register the appropriate contact handlers. Any hints how to do that?

Was it helpful?

Solution

I'm not sure what you mean by "contact handlers".

But you have to supply a folding strategy class based on AbstractFoldingStrategy. However folding strategy to go with most commonly used braces is not in the default AvalonEditor package, you can find one in the sample application or find it somewhere on the internet. But as you can't really do it to 100% without syntactic analysis of the code being edited, this simple BraceFoldingStrategy will occasionally behave in a rather odd way.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top