如何使用AvalonEdit在微软Surface应用程序? [英] How to use AvalonEdit in Microsoft Surface application?

查看:743
本文介绍了如何使用AvalonEdit在微软Surface应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 AvalonEdit 在微软Surface应用程序。它的工作很棒,但我有一个问题折叠。有此小+图标,使折叠。但我不知道我可以注册相应的接触处理。任何提示如何做到这一点?

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?

推荐答案

我不知道你所说的接触处理的意思。

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

但你必须提供基于AbstractFoldingStrategy折叠策略类。然而折策略去与最常用的支架是不是在默认AvalonEditor包,你可以找到一个示例应用程序或<一href="https://cinch.svn.$c$cplex.com/svn/cinch/V1%20%28VS2008%20WPF%20Only%29/cinch/Cinch$c$cGen/UserControls/BraceFoldingStrategy.cs"相对=nofollow>某处在互联网上找到它。但是,因为你不能真正做到这一点,以100%未经code语法分析被编辑,这个简单的BraceFoldingStrategy偶尔会表现在一个相当奇怪的方式。

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.

这篇关于如何使用AvalonEdit在微软Surface应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆