4

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 では次のエラーが表示されます。

  1. The name Scintilla does not exist in the namespace "clr-namespace:ScintillaNET".
  2. The tag 'Scintilla' does not exist in XML namespace 'clr-namespace:ScintillaNET. Line 8 position 14.'

  3. 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

4

2 に答える 2

3

名前空間 ( msdn ) が間違っています。

参照されている clr-namespace が、カスタム クラスを参照しているアプリケーション コードと同じアセンブリ内で定義されている場合は、アセンブリを省略できます。

この名前空間を確認してください:

xmlns:scintilla="clr-namespace:ScintillaNET;assembly=ScintillaNET"
于 2013-09-01T15:17:10.357 に答える