我正在尝试ScintillaNET
在 WPF 中使用(通过Windows Forms Host
)。但是我得到一个无效的 XAML 标记。我的 XAML 代码是:
<Window x:Class="ObjectiveWin.Editor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:scintilla="clr-namespace:ScintillaNET"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="ObjectiveWin 2013 Express" Height="392.537" Width="628.358" WindowState="Maximized" Loaded="editor_Loaded">
<Grid>
<WindowsFormsHost HorizontalAlignment="Left" Height="340" Margin="0,22,0,0" VerticalAlignment="Top" Width="620">
<scintilla:Scintilla></scintilla:Scintilla>
</WindowsFormsHost>
</Grid>
但是,Visual Studio 2012 给了我这些错误:
The name Scintilla does not exist in the namespace "clr-namespace:ScintillaNET".
The tag 'Scintilla' does not exist in XML namespace 'clr-namespace:ScintillaNET. Line 8 position 14.'
The name 'scintilla:Scintilla' was not found. Verify you are not missing an assembly reference and that all referenced assemblies have been built
我到底做错了什么?如果重要的话,我正在.NET Framework 4.5
使用VS2012