How to use AvalonEdit in Microsoft Surface application?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 02:35:28

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/4998967/how-to-use-avalonedit-in-microsoft-surface-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!