我正在尝试在我正在构建的 WPF 应用程序中使用来自 SharpDevelop 4.0 项目的 ICSharpCode.AvalonEdit.TextEditor 控件,但我似乎无法让它工作。
我从 svn://svnmirror.sharpdevelop.net/sharpdevelop/trunk/SharpDevelop/src/Libraries/AvalonEdit 在修订版 4304 中检查了源代码的副本。然后,我使用 Visual Studio 2008 SP1 构建了该项目,该项目没有成功错误。
然后我创建了一个空白的新 WPF 项目,将构建 DLL 添加到工具箱中,并将 TextEditor 控件拖放到默认的空窗口中,如下所示:
<Window x:Class="AvalonEditTest.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
Title="Window1" Height="300" Width="300" >
<Grid x:Name="LayoutRoot">
<avalonedit:TextEditor Name="textEditor" />
</Grid>
</Window>
但是,当我运行项目时,表单完全空白。没有插入符号,鼠标光标保持默认指针,窗口不响应按键。
我错过了什么,还是 AvalonEdit 有点坏了?
[编辑:我开始认为这可能与我的特定设置有关。我正在运行 64 位 Windows 7 RC。这可能与它有关吗?我试过只为 x86 构建它,没有区别。]