我有一个奇怪的问题,增加了dll引用。 我有一个WPF应用程序,我试图使用WPF MDI库: http://wpfmdi.codeplex.com/
正如指令(这是非常模糊)说,我就引用在VS2012右键点击,点击Add reference..
,点击Browse..
,并加入我的DLL,我下载。
接着,我添加以下行中我的窗口的XAML: xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
如在说明书中规定。
然而,尝试添加一个时<mdi:MdiContainer>
时,将显示下列错误消息:
The type 'mdi:MdiContainer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
The name "MdiContainer" does not exist in the namespace "clr-namespace:WPF.MDI;assembly=WPF.MDI".
有任何想法吗?
编辑:
加入我的XAML文件
<Window x:Name="..." x:Class="MyClass.MyClass"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
Title="" WindowState="Maximized">
<Window.Resources>
<Style TargetType="TreeView">
<Setter Property="Padding" Value="0,0,20,0"/>
<Setter Property="BorderBrush" Value="Gray"/>
<Setter Property="BorderThickness" Value="0,0,5,0"/>
</Style>
</Window.Resources>
<mdi:MdiContainer></mdi:MdiContainer>
</Window>